-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.aliases
executable file
·69 lines (54 loc) · 2.32 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
# ###########################################
# usefull command #
###########################################
alias show="defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder ; say Hidden files is now visible ;"
alias hide="defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder ; say Hidden files is now hidden in the hole ;"
# Flush Directory Service cache
alias flush="sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder; say cache flushed"
# View HTTP traffic
alias sniff="sudo ngrep -d 'en1' -t '^(GET|POST) ' 'tcp and port 80'"
alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\""
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en0"
alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
###########################################
# Abreviation #
###########################################
alias artisan="php artisan"
# GIT
alias g="git"
alias ga="git add"
alias gaa="git add ."
alias gac="git add -A && git commit"
alias gc="git commit"
alias gf="git fetch"
alias gp="git push"
alias gpl="git pull"
alias gco="git checkout"
alias gb="git branch"
alias gbd="git branch -D"
alias gs="git status -sb"
alias gl="git log"
alias gcom="git checkout master"
alias gcod="git checkout develop"
alias nah="git reset --hard && git clean -df"
# DOCKER COMPOSE
alias dcwp='docker-compose exec --user www-data phpfpm wp'
alias dcbash='docker-compose exec --user root phpfpm bash'
###########################################
# customize command #
###########################################
# List all files colorized in long format
alias l="ls -lF ${colorflag}"
# List all files colorized in long format, including dot files
alias la="ls -laF ${colorflag}"
# List only directories
alias lsd="ls -lF ${colorflag} | grep --color=never '^d'"
# Always use color output for `ls`
alias ls="command ls ${colorflag}"
# Always enable colored `grep` output
# Note: `GREP_OPTIONS="--color=auto"` is deprecated, hence the alias usage.
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'