-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash_aliases.txt
72 lines (57 loc) · 2.3 KB
/
bash_aliases.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Execute: sudo cp bash_aliases.txt ~/.bash_aliases
#==== Linux Aliases ====#
# Utils
alias update="sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y;sudo apt autoremove -y;";
alias install="sudo apt-get install -y";
alias sshkey="cat ~/.ssh/id_ecdsa.pub | xclip -sel clip && echo 'Copied to Clipboard.'";
alias c="clear";
alias x="exit";
alias undeb="sudo dpkg -i";
alias fnd="find . -type f -name";
alias bluetooth="sudo /etc/init.d/bluetooth start";
# Navigation
alias ..="cd ..";
alias repos="cd ~/Repositories";
alias downl="cd ~/Downloads";
# Misc
alias timer='echo "Timer started. Stop with Ctrl-D." && date "+%a, %d %b %H:%M:%S" && time cat && date "+%a, %d %b %H:%M:%S"';
alias myips="ifconfig | grep 'inet ' | grep -v 127.0.0.1 | awk '{print $2}' && echo 'public:' && dig +short myip.opendns.com @resolver1.opendns.com";
alias publicip="curl -s http://checkip.dyndns.com/ | sed 's/[^0-9\.]//g'";
alias weather="curl -4 wttr.in/${1:-mexicali}";
#==== Laravel Aliases ====#
alias laravel="composer create-project --prefer-dist laravel/laravel";
alias serve="php artisan serve";
alias pa="php artisan";
alias migreset="php artisan migrate:reset";
alias fresh="php artisan migrate:refresh --seed";
alias phpu="./vendor/bin/phpunit --testdox";
alias phpu-html="./vendor/bin/phpunit --coverage-html=html";
alias dusk="php artisan dusk --testdox";
alias serve-dusk="php artisan serve --env=dusk.local";
#==== MySQL Aliases ====#
alias mysqlogin="mysql -uroot -proot";
#==== Git Aliases ====#
alias add="git add .";
alias gitst="git status";
alias commit="git commit -m";
alias gac="git add .; git commit -m"
alias nah="git reset --hard;git clean -df";
alias push="git push origin";
alias gch="git checkout";
alias gbr="git branch";
alias glog="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
#==== Personal Functions ====#
# Remove a Service/App
remove() {
sudo apt remove -y "$1" &&
sudo apt purge -y "$1" &&
sudo apt-get autoremove -y &&
sudo apt-get clean
}
# Manage Services
rserv() { sudo service "$1" restart; }
sserv() { sudo service "$1" status; }
# Create a new directory and enter it
mkd() { mkdir "$1" && cd "$1"; }
# Geolocate a public IP
locate-ip() { curl -s http://ipinfo.io/ $(dig +short "$1") | jq ; }