Created
July 13, 2014 00:06
-
-
Save calebdre/baa278b189dd886b4676 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
#misc aliases | |
alias ..="cd .." | |
alias ...="cd ../../" | |
alias ebash="vim ~/.bash_profile" | |
alias sbash="source ~/.bash_profile" | |
alias sub="sublime ." | |
alias pip="pip3" | |
alias python="python3" | |
#vagrant aliases | |
alias vrestart="vagrant destroy && vagrant up" | |
alias vup="vagrant up" | |
alias vd="vagrant destroy" | |
alias vssh="vagrant ssh" | |
alias vpr="vagrant provision" | |
alias vsus="vagrant suspend" | |
alias gs="git status" | |
alias ga="git add -A" | |
#cool zsh commands | |
alias mkdir="take" | |
function sshkey(){ | |
pbcopy < ~/.ssh/id_rsa.pub | |
echo "ssh key copied!" | |
} | |
function run_server(){ | |
npm install connect serve-static --save | |
touch server.js | |
echo "var connect = require('connect'), serveStatic = require('serve-static'); connect().use(serveStatic(__dirname, {'index': ['index.html']})).listen(8000);" >> server.js | |
echo "Running server @ localhost:8000" | |
node server.js | |
} | |
function localhost(){ | |
if (($# != 1)); then | |
open http://localhost:5000 | |
else | |
open http://localhost:$1 | |
fi | |
} | |
function sites(){ | |
if (( $# != 1)); then | |
cd ~/sites | |
else | |
cd ~/sites/$1 | |
fi | |
} | |
function clone_box(){ | |
if (( $# != 1 )); then | |
git clone git@github.com:calebdre/Portable-Vagrant.git ./ | |
else | |
git clone git@github.com:calebdre/Portable-Vagrant.git $1 && cd $1 | |
fi | |
} | |
function new_box(){ | |
clone_box $1 | |
vagrant up | |
cd app | |
sublime . | |
open http://localhost:5000 | |
} | |
function new_laravel_box(){ | |
clone_box $1 | |
cat puppet/manifests/init.pp | sed 's/""/"laravel"/' | tee puppet/manifests/init.pp | > /dev/null | |
vagrant up | |
if [ "${@: -1}" != "-e"]; then | |
rm -rf app | |
composer create-project laravel/laravel app | |
chmod -R 777 app/storage | |
fi | |
open http://localhost:5000 | |
} | |
# for android | |
export PATH=/usr/local/php5/bin:~/Downloads/adt/tools:$HOME/.composer/vendor/bin:~/Downloads/adt/platform-tools:$PATH | |
# Setting PATH for Python 3.4 | |
# The orginal version is saved in .bash_profile.pysave | |
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}" | |
export PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment