-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases
140 lines (119 loc) · 4.64 KB
/
.aliases
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# NAVIGATION #
##############
alias ..="cd .. && lsa"
alias ...="cd ../.. && lsa"
alias ....="cd ../../.. && lsa"
alias .....="cd ../../../.. && lsa"
alias ~="cd ~ && lsa"
# FOLDERS #
###########
alias dl="cd ~/Downloads && lsa"
alias db="cd ~/Dropbox && lsa"
alias dv="cd ~/Sites && lsa"
alias desk="cd ~/Desktop && lsa"
# SHORTCUTS #
#############
alias hosts="sudo vim /private/etc/hosts" # Edit hosts file
alias grep="grep -i" # Ignore case
alias mv="mv -iv" # Move -interactive, verbose
alias md="mkdir" # Make a folder
alias man="man -a" # Show all sections for manuals
alias cpd="cp -r" # Copy -recursively
alias rd="rm -rf" # Remove -recursively
alias rm="rm -i" # Remove -interactive
alias c="clear" # Clear terminal view
alias t="touch" # Create file
alias o="open" # Open file
alias oo="open ." # Open all files in folder
alias l="ls -l ${colorflag}" # List all files colorized in long format
alias lsa="ls -a ${colorflag}" # List all files colorized
alias la="ls -la ${colorflag}" # List all files colorized in long format, including dot files
alias lh="ls -a ${colorflag} | egrep '^\.'" # List only hidden/dot files
alias lsd="ls -l ${colorflag} | grep '^d'" # List only directories
alias ls="command ls ${colorflag}" # Always use color output for `ls`
export LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:"
# GIT #
#######
alias g="git"
alias ga="git add "
alias gb="git branch "
alias gr="git remote "
alias gm="git merge "
alias gc="git commit -m "
alias go="git checkout "
alias gom="git checkout master"
alias god="git checkout dev"
alias gs="c && git status "
alias gf="git fetch "
alias gp="git pull && git push"
alias gpl="git pull "
alias gps="git push "
alias gcp="git cherry-pick -n "
alias grbs="git rebase -i "
alias gstsh="git stash"
alias gundo="git reset --soft"
alias gnuke="git reset --hard"
alias gd="git diff "
alias gds="git diff --stat "
alias gdc="git diff --cached"
alias gdcs="git diff --stat --cached"
alias gl="git log --decorate --oneline --graph --all "
alias gl5="git log --decorate --oneline --graph -n 5"
alias gl10="git log --decorate --oneline --graph -n 10"
alias gl20="git log --decorate --oneline --graph -n 20"
alias glast="git log -l HEAD"
alias gorig="git remote show origin"
# NPM #
#######
alias n="npm"
alias nls="npm ls --depth=0"
alias nlg="npm -g ls --depth=0"
alias ni="npm install"
alias nu="npm uninstall"
alias nr="npm run"
alias nrr="npm run release"
alias nrb="npm run build"
alias nrp="npm run publish"
alias nrbp="npm run build:prod"
alias nrc="npm run clean"
alias nrd="npm run dev"
alias nrs="npm run start"
alias nrsvr="npm run server"
alias nrt="npm run test"
alias nrtw="npm run test:watch"
# FIREBASE #
############
alias fbi="firebase init"
alias fbd="firebase deploy"
alias fbs="firebase serve"
alias fbo="firebase open hosting:site"
# GRUNT #
#########
alias grn="grunt"
alias grnd="grunt dev"
alias grnp="grunt dist"
alias grnc="grunt css"
alias grnj="grunt js"
alias grnw="grunt watch"
# MORE #
########
alias h="hyper"
alias v="vim"
alias a="atom ."
alias s="sublime ."
# Notifications
alias notify="terminal-notifier -message"
# Entertainment
alias tetris="emacs -q --no-splash -f tetris"
alias matrix="cmatrix -a -C blue"
# Stopwatch
alias timer="echo 'Timer started. Stop with Ctrl-D.' && date && time cat && date"
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en1"
alias ips="ifconfig -a | grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\|[a-fA-F0-9:]\+\)' | sed -e 's/inet6* //'"
# Enhanced WHOIS lookups
alias whois="whois -h whois-servers.net"
# Empty the Trash on all mounted volumes and the main HDD
# Also, clear Apple’s System Logs to improve shell startup speed
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"