forked from colbycheeze/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
39 lines (32 loc) · 1.26 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
# Unix
alias tlf="tail -f"
alias ln='ln -v'
alias mkdir='mkdir -p'
alias ...='../..'
alias l='ls'
alias ll='ls -al'
alias lh='ls -Alh'
alias -g G='| grep'
alias -g M='| less'
alias -g L='| wc -l'
alias -g ONE="| awk '{ print \$1}'"
alias e="$EDITOR"
alias v="$VISUAL"
# Pretty print the path
alias path="echo $PATH | tr -s ':' '\n'"
# Navigation
alias cdproj="cd ~/projects"
alias cdwiki="cd ~/Dropbox/vimwiki"
# Go to the root of a project (git root)
alias root='cd $(git rev-parse --show-cdup)'
# This kills a process that slows down my Mac every once in a while...??
alias killn="ps -ax | grep notifyd | head -1 | awk '{print \$1}' | sudo xargs kill"
# kill a rogue process running on a specific port
# usage: `killp 3000`
killp() { lsof -n "-i4TCP:${1:-3002}" | grep LISTEN | tr -s ' ' | cut -f 2 -d ' ' | xargs kill -9}
# Do all of my login stuff for cf
alias cfgo="cf login -a $CFAPI -u $CFEMAIL -p $CFPASSWORD -o $CFEMAIL -s dev && npm start"
# Start a browsersync server watching the current directory
bsync() { browser-sync start --files "./**" --server; }
# Start a browsersync server and proxy 3000 (or pass a different number to proxy something else, IE: bsyncp 8000 for localhost:8000)
bsyncp() { browser-sync start --files "./**" --proxy "localhost:${1:-3000}" --no-open; }