Created
August 31, 2012 09:22
-
-
Save liuggio/3550715 to your computer and use it in GitHub Desktop.
one liner PROUDLYGIDEA
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
# a simple user can execute a 'service php5-fpm reload' | |
# modify | |
userx ALL=(root) NOPASSWD: /usr/sbin/service php5-fpm reload, /usr/bin/setfacl | |
#to your /etc/sudoers be careful leave the last line empty | |
#apache2 | |
userx ALL=(root) NOPASSWD: /usr/sbin/service apache2 restart, /usr/sbin/service apache2 start, /usr/sbin/service apache2 stop, /usr/bin/setfacl | |
#akc-grep | |
#As of the ack-grep manpage the following is much more awesome. Create an .ackrc in your home folder with: | |
--type-set | |
twig=.twig | |
#COMPOSER | |
curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/bin && echo -n "link" && ln -s /usr/bin/composer.phar /usr/bin/composer && echo "ed"; | |
#EXTRACT ALL TAR.GZ | |
for i in `ls *.tar.gz`; do tar xvfz $i; done | |
#minimal requirment for s2-web app | |
apt-get install curl php-apc php5-curl php5-mcrypt php5-gd openjdk-7-jre php5-mysql php5-cli | |
apt-get install git | |
#minimal requirment for mysql server | |
apt-get install mysql-server phpmyadmin fail2ban | |
#sed if not exist, remove drop table | |
sed -i 's/CREATE TABLE/CREATE TABLE IF NOT EXISTS/g' dump_db_notsafe | |
sed -i 's/INSERT/INSERT IGNORE/g' dump_db_notsafe | |
cat dump_db_notsafe | grep -v "DROP TABLE IF" > dump_db_safe | |
#phpunit on the right screen :) | |
while true; do clear; phpunit; if [ ! $? ]; then sleep 10; else sleep 3;fi; done; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Really good. Would be pretty useful in combination with Vagrant