Skip to content

Instantly share code, notes, and snippets.

@jeremyworboys
Last active August 29, 2015 13:56
Show Gist options
  • Save jeremyworboys/9201342 to your computer and use it in GitHub Desktop.
Save jeremyworboys/9201342 to your computer and use it in GitHub Desktop.
ZSH Aliases
alias c='clear'
alias l="ls -FlAGh"
alias lo="ls -FlAGh | awk '{k=0;for(i=0;i<=8;i++)k+=((substr(\$1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf(\"%0o \",k);print}'"
alias server="php -S 0.0.0.0:8080"
alias clearcache="sudo killall -HUP mDNSResponder"
alias pubkey="/bin/cat ~/.ssh/id_rsa.pub | pbcopy"
alias name="uname -n | tee /dev/ttys001 | pbcopy"
alias art="php artisan"
alias test="clear && phpunit"
function convertarrays() {
curl "https://raw.github.com/thomasbachem/php-short-array-syntax-converter/master/convert.php" -o convert.php
find app -name "*.php" -exec php "convert.php" -w "{}" \;
rm convert.php
}
function m() {
mkdir -p "$@" && cd $_
}

Run the following commands in the terminal:

curl https://gist.githubusercontent.com/jeremyworboys/9201342/raw/.zalias -k > ~/.zalias
echo "source $HOME/.zalias" >> ~/.zshrc
source ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment