Linux installation notes (tested under Ubuntu 12.04LTS), assuming VirtualBox is already installed on host.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS1='\[\033[0;37m\][\t]\[\033[0;32m\][\u]\[\033[31m\][\h]`git branch 2>/dev/null | grep \* | head -1 | sed "s/\* //g" | awk "{ print \"[ \"\\\$1 \" ]\" }"` \[\033[1;33m\]\w\a\[\033[0m\]\n\$ ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace My\Custom\Doctrine2\Function; | |
/** | |
* RandFunction ::= "RAND" "(" ")" | |
*/ | |
class Rand extends FunctionNode | |
{ | |
public function parse(\Doctrine\ORM\Query\Parser $parser) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class LayoutExtension extends \Twig_Extension | |
{ | |
/** | |
* {@inheritdoc} | |
*/ | |
public function getName() | |
{ | |
return 'yolo'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\HttpKernel\Kernel; | |
use Symfony\Component\Config\Loader\LoaderInterface; | |
class AppKernel extends Kernel | |
{ | |
// .... | |
protected function getKernelParameters() |
How is listed with vagrant plugin list |
How to use in Vagrant.has_plugin? | link to plugin.rb in repo |
---|---|---|
bindler | Bindler | fgrehm/bindler |
vagrant-hostmanager | HostManager | smdahlen/vagrant-hostmanager |
vagrant-cachier | vagrant-cachier | fgrehm/vagrant-cachier |
vagrant-aws | AWS | mitchellh/vagrant-aws |
vagrant-rackspace | RackSpace Cloud | mitchellh/vagrant-rackspace |
vagra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function searchCriteria($criteria){ | |
$cleanCritera = array(); | |
foreach($criteria as $key => $value){ | |
if( isset( $this->_class->fieldNames[$key] ) && !empty($value) ){ | |
$cleanCritera[$key] = $value; | |
} | |
} | |
if(empty($cleanCritera)){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Things needed to be adapted : | |
# server_name my-domain.com | |
# | |
# root /home/www | |
# The root of the Symfony "web" folder (with app.php and app_dev.php in it). | |
# | |
# fastcgi_pass unix:/var/run/php5-fpm.sock | |
# This sock can be elsewhere (/var/run/php5-fpm/php5-fpm.sock for example...) | |
# | |
# There are other things needed to be changed/fixed. |
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo ">>> Starting Install Script" | |
# Update | |
sudo apt-get update | |
# Install MySQL without prompt | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' |
OlderNewer