Created
June 4, 2013 10:58
-
-
Save bichotll/5705135 to your computer and use it in GitHub Desktop.
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
#just a secure sudo | |
bic_sudo() { | |
echo -e "\e[0;31mAre you sure\e[00;m that you want to use sudo?"; | |
echo -e "\e[0;34mMaybe you can do it in other way..." | |
echo -e -n '\e[00m' | |
read suresudo; | |
if [ $suresudo == "yes" ] || [ $suresudo == "y" ] ; | |
then | |
sudo $@; | |
else | |
echo -e "Remember:\e[0;32mEvery time you do a bash mistake god kills a kitten" | |
echo -e -n '\e[00m' | |
fi | |
} | |
### | |
#alias sudo='bic_sudo' | |
#a wicked script composer fix for a wicked unix | |
bic_wicked_composer() { | |
org_path=$PWD | |
sudo mkdir /tmp/mycomposerpath | |
sudo chown $USER /tmp/mycomposerpath | |
mv $org_path/* /tmp/mycomposerpath | |
cd /tmp/mycomposerpath | |
if [ ! -f /tmp/mycomposerpath/composer.phar ] | |
then | |
wget https://getcomposer.org/installer --no-check-certificate | |
mv installer composer.phar | |
fi | |
php composer.phar $@ | |
mv /tmp/mycomposerpath/* $org_path | |
sudo rm -R /tmp/mycomposerpath | |
cd $org_path | |
} | |
alias composer_wicked='bic_wicked_composer' | |
#edit apache conf | |
bic_apache_conf() { | |
sudo vim /path/user.conf | |
} | |
#restart apache server | |
bic_apache_restart(){ | |
sudo /path restart | |
} | |
#log apache | |
bic_apache_log(){ | |
tail -200 ~/path/file.log | |
} | |
#vim bash profile | |
bic_bash_profile(){ | |
vim ~/.bash_profile | |
} | |
#symfony - cache:clear proj | |
bic_sf_cache(){ | |
sudo chown user:group ./ | |
sudo chown apache:apache app/cache/dev | |
sudo chown apache:apache app/cache/dev | |
sudo chmod 775 -R app/cache/dev | |
sudo chmod 775 -R app/cache/dev_old | |
./app/console cache:clear | |
} | |
#symfony - doctrine | |
bic_sf_doctrine_restart(){ | |
php app/console doctrine:schema:update --force | |
} | |
#symfony - ./app/console | |
bic_sf_console(){ | |
./app/console $@ | |
} | |
sf(){ | |
./app/console $@ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment