Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
151 lines (122 sloc) 3.88 KB
#####
# Terminal
#####
alias e='exit'
alias h='history'
alias bi='bundle install'
alias be='bundle exec'
alias r="cd ."
alias ll="ls -al"
alias lt="ls -lrt"
alias l='ls -lah'
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
alias p='ping www.google.com'
alias servethis='python -m SimpleHTTPServer 8080'
alias rubyserver="ruby -run -e httpd . -p 9090"
alias al="alias | grep"
alias hgrep='history | grep'
alias reload='source $HOME/.bashrc 1>/dev/null'
alias install='sudo apt-get install'
alias remove='sudo apt-get remove'
alias dfree="df -h -x tmpfs"
alias json="python -mjson.tool"
alias extip="dig -4 @ns1-1.akamaitech.net -t a whoami.akamai.net +short"
alias intip="ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'"
# Clear terminal and empty scrollback
alias clear='printf "\ec"'
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# Recursive directory listing
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
# Show which commands you use the most
alias freq='cut -f1 -d" " ~/.bash_history | sort | uniq -c | sort -nr | head -n 30'
# Search for processes
alias psg='ps -ef | grep'
# Show active network listeners
alias netlisteners='lsof -i -P | grep LISTEN'
# sniff GET and POST traffic over http
alias sniff="sudo ngrep -t '^(GET|POST) ' 'tcp and port 80'"
# Random fact
alias fact="elinks -dump randomfunfacts.com | sed -n '/^| /p' | tr -d \|"
# Speed test
alias speedtest='wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip'
# Find the biggest folder
alias ds='du -ks *|sort -n'
#####
# Gnome
#####
alias go='gnome-open'
#####
# Vim
#####
alias v='gvim --remote-silent'
# alias vi="vim"
#####
# Ruby
#####
alias irb='irb --readline -r irb/completion -rubygems'
#####
# Rails
#####
alias rs="rails s"
alias rc="rails c"
alias rss="ruby script/server"
alias rsc="ruby script/console"
alias anno='annotate --exclude tests,fixtures -p after -s'
alias testfiles='ruby -I.:test -e "ARGV.each{|f| require f}"'
alias logreq='tail -f log/development.log -n 10000 | grep --line-buffered Started'
#####
# Rake
#####
alias rr='rake routes'
alias rdm='rake db:migrate'
alias rdp='rake db:populate'
alias rdmt='rake db:migrate RAILS_ENV=test'
alias rdr='rake db:rollback'
alias rdrm='rake db:rollback && rake db:migrate'
alias rdrt='rake db:rollback RAILS_ENV=test'
alias rdtp='rake db:test:prepare'
alias rdd='rake db:drop'
alias rddt='rake db:drop RAILS_ENV=test'
alias rdc='rake db:create'
alias rdct='rake db:create RAILS_ENV=test'
alias rds='rake db:seed'
alias rdcyc='rake db:drop && rake db:create && rake db:migrate'
alias rdcyct='rake db:drop RAILS_ENV=test && rake db:create RAILS_ENV=test && rake db:migrate RAILS_ENV=test'
#####
# Rake
#####
alias t="spring testunit"
alias tmodified="git st | grep test.rb | sed -e 's/^\s*modified:\s*//g' | xargs spring testunit"
#####
# Ack-Grep
#####
alias ag='ack-grep'
#####
# Spring
#####
alias srspec='spring rspec'
#####
# Cucumber
#####
alias cf='cucumber features'
alias cfr='cucumber features --tag @run'
alias cfrs='cucumber features --tag @run --drb'
alias cfg='cucumber features --tag @green'
alias cfs='cucumber features -p selenium'
alias cfsr='cucumber features -p selenium --tag @run'
alias cff='cucumber features && cucumber features -p selenium'
alias cuc='cucumber -r features'
alias cb='chromium-browser --force-device-scale-factor &'
alias game='cd /home/dalibor/applications/brainworkshop && python brainworkshop.pyw'
alias todo='vim ~/Dropbox/notes/todo.txt'
alias pgist='gist -p -o -c -P -f paste'
You can’t perform that action at this time.