Some of the links and tool we always need when doing Database Design with Symfony
$ php app/console doctrine:generate:entities Acme/StoreBundle/Entity/Product
| #!/bin/bash | |
| # add vhost reverse proxy for new docker instance for nginx and restart nginx | |
| # use like this : do_nginx_proxy_vhost subdir.example.com http://192.168.0.20:8080 | |
| function do_nginx_proxy_vhost() { | |
| [ -z $1 -o -z $2 ] && echo "Give host and address" && return | |
| host=$1 | |
| address=$2 | |
| [ -f /etc/nginx/sites-available/proxy_reverse_$host ] && (echo "Updating proxy for host: $host" && sudo rm /etc/nginx/sites-enabled/proxy_reverse_$host) || echo "Creating proxy for host: $host" |
| # install useful tool | |
| sudo apt-get install links chromium-browser chromium-browser-l10n geany geany-plugins curl screen | |
| # Setup LEMP | |
| → https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04 | |
| ## setup mysql | |
| sudo /usr/bin/mysql_secure_installation | |
| sudo apt-get install php5-fpm |
| # useful tools | |
| sudo apt-get install links screen | |
| # install bash-profile | |
| curl -sSL http://raw.github.com/beaudev/bash-profile/master/install-bash-profile.sh|sudo bash |
| <?php | |
| namespace Example\BackBundle\Command; | |
| use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
| use Symfony\Component\Console\Input\InputArgument; | |
| use Symfony\Component\Console\Input\InputInterface; | |
| use Symfony\Component\Console\Input\InputOption; | |
| use Symfony\Component\Console\Output\OutputInterface; |
Some of the links and tool we always need when doing Database Design with Symfony
$ php app/console doctrine:generate:entities Acme/StoreBundle/Entity/Product
##Twig Twig for : For loop and index helpers list
##Mopaboostrap Bundle Mopa BootstrapDocumentation
##Web Resources
| git config --global core.excludesfile ~/work/.gitignore_global | |
| Content of the .gitignore : | |
| .idea |
| #!/bin/bash | |
| # add vhost for a new nginx project | |
| # use like this : do_nginx_proxy_vhost subdir.example.com http://192.168.0.20:8080 | |
| function do_nginx_new_vhost() { | |
| [ -z $1 -o -z $2 -o "$3" ] && echo "Give name, path and hosts" && return | |
| name=$1 | |
| path=$2 |
| apt-get update && apt-get upgrade | |
| sudo apt-get install libdate-manip-perl libterm-readkey-perl libterm-readkey-perl libdigest-hmac-perl libdigest-hmac-perl libdate-manip-perl libmail-imapclient-perl makepasswd rcs perl-doc git | |
| cd /tmp | |
| git clone git://github.com/imapsync/imapsync.git | |
| cd imapsync | |
| sh examples/install_modules_linux.sh | |
| apt-get install build-essential | |
| sh examples/install_modules_linux.sh |
| TMPDIR=$( mktemp -d 2>/dev/null ) | |
| cd $TMPDIR | |
| VERSION=5.3.29 #latest php released stable version in 5.3.X | |
| wget http://in1.php.net/distributions/php-$VERSION.tar.bz2 | |
| tar xvf php-$VERSION.tar.bz2 | |
| cd php-$VERSION |