-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
75 lines (55 loc) · 1.8 KB
/
.bashrc
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
#!/bin/bash
#shopt -s expand_aliases
# Greeting
#====================================================================
echo "welcome back ev!"
# Sources
#====================================================================
source ~/.alias_rgbnotes
# Functions
#====================================================================
#Simple HTTP server
# Paul Irish@http://www.youtube.com/watch?v=Mk-tFn2Ix6g
function server() {
local port="${1:-8000}"
open "http://localhost:${port}/"
python -m SimpleHTTPServer "$port"
}
function dir2iso() {
echo "Generating ISO: ${1} -> ${1}.iso"
hdiutil makehybrid -iso -joliet -o ${1}.iso ${1}
}
# Aliases
#====================================================================
alias cl="clear"
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
alias ll="ls -lh"
alias cll="cl; ll;"
alias lt="ls -lht"
alias edit="open $1 -a \"Sublime Text 2\""
# SSH
alias essh="edit ~/.ssh/config"
alias lssh="cat ~/.ssh/config | grep \"Host \""
# Quick Edit
alias ea="edit ~/.bashrc"
alias sa="source ~/.bashrc"
alias la="cat ~/.bashrc"
# Useful Directories
alias snip="cd ~/Documents/projects/python/_snippets/"
# Utilities
alias dir2iso=dir2iso
alias server=server
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
export PATH="/usr/local/bin:$PATH"
export PATH=$HOME/local/bin:$PATH
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion