Created
April 3, 2011 23:57
-
-
Save frnz/900948 to your computer and use it in GitHub Desktop.
extras.zsh
This file contains hidden or 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
function cl() { | |
cd $1; | |
clear; | |
ls; | |
echo "" | |
} | |
function hack() { | |
function ~/1337/$1; | |
} | |
function h() { | |
cd ~/$1; | |
} | |
function c() { | |
clear; | |
} | |
function generate_ssh_keys() { | |
ssh-keygen -t rsa -C "[email protected]" | |
echo "\n\nPublic Key: \n" | |
cat ~/.ssh/id_rsa.pub | |
} | |
function ssh_keys() { | |
scp ~/.ssh/id_rsa.pub $1:~ | |
ssh $1 "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod -R 600 ~/.ssh/* && cat ~/id_rsa.pub >> ~/.ssh/authorized_keys && rm ~/id_rsa.pub" | |
} | |
# Configs | |
function reload() { | |
source ~/.zshrc; | |
} | |
function config() { | |
cd ~/.oh-my-zsh; | |
} | |
# Rails | |
function logs() { | |
tail -f log/*.log; | |
} | |
function restart() { | |
touch tmp/restart.txt | |
} | |
# NGINX | |
function nginx() { | |
_ /opt/nginx/sbin/nginx -s stop | |
_ /opt/nginx/sbin/nginx | |
} | |
# POSTGRE | |
function postgre() { | |
echo "pg_ctl -D /Users/franzpereira/Developer/var/postgres stop" | |
pg_ctl -D /Users/franzpereira/Developer/var/postgres start | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment