Skip to content

Instantly share code, notes, and snippets.

@truetamtam
Last active May 16, 2016 18:58
Show Gist options
  • Save truetamtam/ac54517a7bd549c30985 to your computer and use it in GitHub Desktop.
Save truetamtam/ac54517a7bd549c30985 to your computer and use it in GitHub Desktop.
Homestead aliases file. Vagrant and Laravel specific.
alias ..='cd ../'
alias ...='cd ../..'
alias ~='cd ~'
alias h='cd ~'
alias c='clear'
alias pa='php artisan'
alias cm='composer'
alias l='ls -Al'
alias phpspec='vendor/bin/phpspec'
alias phpunit='vendor/bin/phpunit'
alias serve=serve-laravel
function serve-laravel() {
if [[ "$1" && "$2" ]]
then
sudo dos2unix /vagrant/scripts/serve-laravel.sh
sudo bash /vagrant/scripts/serve-laravel.sh "$1" "$2" 80
else
echo "Error: missing required parameters."
echo "Usage: "
echo " serve domain path"
fi
}
function serve-hhvm() {
if [[ "$1" && "$2" ]]
then
sudo dos2unix /vagrant/scripts/serve-hhvm.sh
sudo bash /vagrant/scripts/serve-hhvm.sh "$1" "$2" 80
else
echo "Error: missing required parameters."
echo "Usage: "
echo " serve-hhvm domain path"
fi
}
function serve-proxy() {
if [[ "$1" && "$2" ]]
then
sudo dos2unix /vagrant/scripts/serve-proxy.sh
sudo bash /vagrant/scripts/serve-proxy.sh "$1" "$2" 80
else
echo "Error: missing required parameters."
echo "Usage: "
echo " serve-proxy domain port"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment