Skip to content

Instantly share code, notes, and snippets.

@JunaidQadirB
Created May 21, 2020 17:15
Show Gist options
  • Save JunaidQadirB/d8ef6ed06364241f501fd99dde49d460 to your computer and use it in GitHub Desktop.
Save JunaidQadirB/d8ef6ed06364241f501fd99dde49d460 to your computer and use it in GitHub Desktop.
Aliases I use on my *nix machines
source ~/.dotfiles/.aliases_projects
alias art='php artisan'
alias arts='art serve'
alias artm='art migrate'
alias artms='art migrate:refresh --seed'
alias artrl='art route:list'
alias artclear='art clear-compiled &&
art view:clear &&
art config:clear &&
art route:clear &&
art cache:clear'
alias artd='art dusk $@ --env=dusk-local'
alias artsd='art serve $@ --env=dusk.local'
alias v='valet'
alias vl='valet link'
alias vu='valet unlink'
alias vp='valet park'
alias vf='valet forget'
alias vls='valet list'
alias j8='source ~/java-versions/java-8-openjdk.sh'
alias j11='source ~/java-versions/java-11-openjdk.sh'
alias j12='source ~/java-versions/java-12-openjdk.sh'
alias nrd='npm run dev'
alias nrw='npm run watch'
alias nrp='npm run prod'
alias nrwp='npm run watch-poll'
alias ys='yarn start'
alias yrd='yarn run dev'
alias yrw='yarn run watch'
alias yrp='yarn run prod'
alias yrwp='yarn run watch-poll'
alias glo='git log --oneline'
alias glp='git log --pretty="%C(Yellow)%h %C(reset)%ad (%C(Green)%cr%C(reset))%x09 %C(Cyan)%an: %C(reset)%s"'
alias gs='git status'
alias nah="git reset --hard && git clean -df"
alias wip="git add . && git commit -m 'WIP'"
alias ydmp3='youtube-dl --download-archive downloaded.txt --no-post-overwrites -ciwx --audio-format mp3'
alias editaliases="subl ~/.dotfiles/.bash_aliases"
alias editbashrc="subl ~/.dotfiles/.bashrc"
alias sourceb="source ~/.dotfiles/.bashrc"
alias restart-network='sudo service network-manager restart'
function rnmakerel(){
if [[ ! "$PWD" =~ "android" ]]; then
cd android
fi
ENVFILE=.env.production ./gradlew installRelease
cd ../
adbtcp
react-native start
}
function rnmakedbg(){
if [[ ! "$PWD" =~ "android" ]]; then
cd android
fi
ENVFILE=.env.development ./gradlew installDebug
cd ../
adbtcp
react-native start
}
function rnrunrel(){
ENVFILE=.env.production react-native run-android
}
function rnrundbg(){
ENVFILE=.env.development react-native run-android
}
alias cda='composer du'
alias cdo='composer du --optimize'
alias cgr='composer global require'
alias p='./vendor/bin/phpunit'
alias pu='pul --testsuite Unit'
alias pf='pul --testsuite Feature'
alias pb='pul --testsuite Browser'
alias adbtcp='adb reverse tcp:8081 tcp:8081'
alias ace='node ace'
alias tfenv='source ~/tensorflow/bin/activate'
alias lssites='ls /etc/apache2/sites-available'
alias lssitese='ls /etc/apache2/sites-enabled'
#ls only file and directory names without permissions and owner info
function lf()
{
return command ls --color -la | awk '{print $9}'
}
function gedit()
{
gsettings set org.gnome.gedit.preferences.editor editor-font 'Monospace 12'
/usr/bin/gedit "$@"
}
function geditb()
{
gsettings set org.gnome.gedit.preferences.editor editor-font 'Nafees 18'
/usr/bin/gedit "$@"
}
function startemulator()
{
sudo chown $USER /dev/kvm
~/Android/emulator/emulator -avd Pixel_API_22 -dns-server 8.8.8.8
}
alias clistats="awk '{print $1}' ~/.zsh_history | sort | uniq -c | sort -n"
alias copydate='date +"%d-%m-%Y %r" | xclip -selection c'
alias copydate24='date +"%d-%m-%Y %T" | xclip -selection c'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment