Skip to content

Instantly share code, notes, and snippets.

@alghanmi
Last active December 26, 2015 04:39
Show Gist options
  • Select an option

  • Save alghanmi/7095326 to your computer and use it in GitHub Desktop.

Select an option

Save alghanmi/7095326 to your computer and use it in GitHub Desktop.
VPS Basic Account Setup
##
## User Modifications
##
#Set Default Editor
EDITOR=vim
##XTERM modifications (in case needed)
#export TERM="xterm-256color"
#Set $TERM for TMUX
if [ -n "$TMUX" ]; then
export TERM=screen-256color
fi
##
## Bash Aliases
##
#Package update
alias update='sudo aptitude update; sudo aptitude upgrade'
#Recusive checksums
alias md5all='find $@ ! -type d -exec md5sum {} \;'
alias shaall='find $@ ! -type d -exec sha1sum {} \;'
#List all IP addresses including external
alias myip='ip addr show | awk '\''$1 == "inet" && $6 == "global" {if ($7 == "secondary"){print $8" "$2} else {print $7" "$2}}'\'' | column -t && echo -n "inet " && curl http://ifconfig.co'
#Editors
alias vi='vim'
alias emacs='emacs -nw'
#TMUX 256-colors
alias tmux='tmux -2'
#Git - pull all repos within a directory
alias gpull='for i in $(find . -type d -maxdepth 1 -mindepth 1 | tr "\n" " "); do echo "Checking $i"; cd $i; git pull; cd ..; done'
#dd Hard Drive test
alias ddtest='dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync'
#GitHub Connection Preferences
Host github.com
User git
ControlMaster auto
ControlPath /tmp/%r@%h:%p
ControlPersist yes
Host *
Compression yes
CompressionLevel 7
ServerAliveInterval 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment