This guide is now available under this URL:
http://docs.behat.org/cookbook/bdd_in_symfony2_with_behat_mink_and_zombiejs.html
| cd ~ | |
| sudo apt-get install unzip | |
| sudo apt-get install python-software-properties -y | |
| sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" | |
| sudo apt-get update | |
| sudo apt-get install sun-java6-jre sun-java6-plugin -y | |
| wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.17.6.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz |
This guide is now available under this URL:
http://docs.behat.org/cookbook/bdd_in_symfony2_with_behat_mink_and_zombiejs.html
| <?php | |
| class sfSearchTask extends sfCommandApplicationTask | |
| { | |
| /** | |
| * @see sfTask | |
| */ | |
| protected function configure() | |
| { | |
| $this->addArguments(array( |
| <?php | |
| use Doctrine\ORM\EntityManager, | |
| Doctrine\ORM\Configuration, | |
| Doctrine\ORM\Mapping\ClassMetadata; | |
| /** | |
| * Active Entity trait | |
| * | |
| * Limitations: a class can only ever be assocaited with ONE active entity manager. Multiple entity managers |
| #!/usr/bin/env php | |
| <?php | |
| $paths = array(); | |
| if (isset($_SERVER['argv'])) | |
| { | |
| $paths = $_SERVER['argv']; | |
| array_shift($paths); | |
| if (!$paths) |
| server { | |
| expires 1M; | |
| listen 80; | |
| root /var/www/vhosts/sociallynotable.com/socially-notable/web; | |
| index index.php; | |
| if ($host ~* ^www.(.*)) { | |
| set $remove_www $1; | |
| rewrite ^(.*)$ http://$remove_www$1 permanent; | |
| } |
| # NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
| $ cd /usr/src | |
| $ wget http://nginx.org/download/nginx-1.2.1.tar.gz | |
| $ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz | |
| $ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz | |
| $ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz | |
| $ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz |
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
| <html> | |
| <head> | |
| <style type="text/css"> | |
| a { text-decoration: none; } | |
| a:hover { text-decoration: underline; } | |
| h1 { font-family: arial, helvetica, sans-serif; font-size: 18pt; font-weight: bold;} | |
| h2 { font-family: arial, helvetica, sans-serif; font-size: 14pt; font-weight: bold;} | |
| body, td { font-family: arial, helvetica, sans-serif; font-size: 10pt; } | |
| th { font-family: arial, helvetica, sans-serif; font-size: 11pt; font-weight: bold; } |
| <?php | |
| class ProjectConfiguration extends sfProjectConfiguration | |
| { | |
| public function setup() | |
| { | |
| $this->dispatcher->connect('command.filter_options', array($this, 'filterCommandOptions')); | |
| } | |
| /** |
| $(document).ready(function() | |
| { | |
| // flash messages | |
| var ffm = $(".flash_message:first") | |
| if (ffm.size()) | |
| { | |
| $.notifyBar({ | |
| html: ffm.html(), | |
| cls: ffm.hasClass("flash_notice") ? "success" : "error", | |
| delay: 2000, |