Last active
March 10, 2019 14:21
-
-
Save zaknesler/f1a28cb9ff9e0a3b3ce6d136f963378f to your computer and use it in GitHub Desktop.
Aliases
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
#!/bin/bash | |
alias a="php artisan" | |
alias amf="php artisan migrate:fresh --seed" | |
alias art="php artisan" | |
alias c="clear" | |
alias code="cd ~/Code" | |
alias db="touch ./database/database.sqlite" | |
alias gaa="git add ." | |
alias gc="git commit -m" | |
alias gcom="git checkout master" | |
alias gl="git log" | |
alias gpl="git pull" | |
alias gpsh="git push" | |
alias gs="git status" | |
alias n="npm" | |
alias nah="git reset --hard && git clean -df" | |
alias p="./vendor/bin/phpunit" | |
alias pe="./vendor/bin/phpunit --exclude-group" | |
alias pf="./vendor/bin/phpunit --filter" | |
alias pg="./vendor/bin/phpunit --group" | |
alias pip="pip3" | |
alias py="python3" | |
alias python="python3" | |
alias rb="ruby" | |
alias sites="cd ~/Code/Valet" | |
alias tinker="php artisan tinker" | |
alias weather="curl https://wttr.in/\?u\&0 && echo ''" | |
alias wip="git add . && git commit -m 'wip' -q" | |
alias y="yarn" | |
function sue { | |
composer install | |
composer run-script post-root-package-install | |
composer run-script post-create-project-cmd | |
} | |
function upev { | |
npm install -g npm | |
npm update -g | |
composer global update | |
brew upgrade | |
brew cleanup | |
} | |
function laranew { | |
PROJECT=$1 | |
echo "Creating new Laravel project: $PROJECT" | |
cd ~/Code/Sites | |
laravel new $PROJECT | |
cd $PROJECT | |
git init | |
git add . | |
git commit -m "Install Laravel" | |
replace "APP_URL=http://localhost" "APP_URL=http://$PROJECT.test" -- .env | |
replace "DB_DATABASE=homestead" "DB_DATABASE=$PROJECT" -- .env | |
replace "DB_USERNAME=homestead" "DB_USERNAME=root" -- .env | |
replace "DB_PASSWORD=secret" "DB_PASSWORD=" -- .env | |
replace "<env name=\"QUEUE_CONNECTION\" value=\"sync\"/>" $'<env name="QUEUE_CONNECTION" value="sync"/>\n <env name="DB_CONNECTION" value="sqlite"/>\n <env name="DB_DATABASE" value=":memory:"/>' -- phpunit.xml | |
git add . | |
git commit -m "Update phpunit configuration" | |
subl . | |
echo -e "\e[36mFinished." | |
} | |
phpv() { | |
valet stop | |
brew unlink php@7.2 php@7.3 | |
brew link --force --overwrite $1 | |
brew services start $1 | |
composer global update | |
valet install | |
} | |
alias usephp72="phpv php@7.2" | |
alias usephp73="phpv php" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment