Skip to content

Commit

Permalink
updating .aliases against mathias'.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Sep 9, 2012
1 parent 3db9118 commit 785fc73
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
32 changes: 15 additions & 17 deletions .aliases
@@ -1,6 +1,8 @@
# Easier navigation: .., ..., ~ and -
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"

Expand All @@ -10,7 +12,7 @@ alias shhve='ssh paul@ve.hsh6wjwx.vesrv.com'

# programs
alias slt='open -a "Sublime Text 2"'
# also do this:
# also/or do this:
# ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl

# be nice
Expand All @@ -20,8 +22,19 @@ alias please=sudo
alias bunyip='node ~/code/bunyip/cli.js'


# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
colorflag="--color"
else # OS X `ls`
colorflag="-G"
fi

# List all files colorized in long format
alias l="ls -l ${colorflag}"

# List all files colorized in long format, including dot files
alias la="ls -Gla"
alias la="ls -la ${colorflag}"


# List only directories
alias lsd='ls -l | grep "^d"'
Expand All @@ -34,7 +47,6 @@ else
export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:'
fi


# `cat` with beautiful colors. requires Pygments installed.
# sudo easy_install Pygments
alias c='pygmentize -O style=monokai -f console256 -g'
Expand All @@ -44,9 +56,6 @@ alias c='pygmentize -O style=monokai -f console256 -g'
# Undo a `git push`
alias undopush="git push -f origin HEAD^:master"

# hub override.
# alias git=hub # not crazy about this..


# git root
alias gr='[ ! -z `git rev-parse --show-cdup` ] && cd `git rev-parse --show-cdup || pwd`'
Expand Down Expand Up @@ -79,11 +88,8 @@ alias c="tr -d '\n' | pbcopy"
alias cleanup="find . -name '*.DS_Store' -type f -ls -delete"

# Shortcuts
alias d="cd ~/Documents/Dropbox"
alias p="cd ~/Projects"
alias g="git"
alias v="vim"
alias m="mate ."

# File size
alias fs="stat -f \"%z bytes\""
Expand All @@ -94,18 +100,10 @@ alias rot13='tr a-zA-Z n-za-mN-ZA-M'
# Empty the Trash on all mounted volumes and the main HDD
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; rm -rfv ~/.Trash"

# Show/hide hidden files in Finder
alias show="defaults write com.apple.Finder AppleShowAllFiles -bool true && killall Finder"
alias hide="defaults write com.apple.Finder AppleShowAllFiles -bool false && killall Finder"

# Hide/show all desktop icons (useful when presenting)
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"

# Disable Spotlight
alias spotoff="sudo mdutil -a -i off"
# Enable Spotlight
alias spoton="sudo mdutil -a -i on"

# PlistBuddy alias, because sometimes `defaults` just doesn’t cut it
alias plistbuddy="/usr/libexec/PlistBuddy"
Expand Down
6 changes: 6 additions & 0 deletions install-deps.sh
Expand Up @@ -39,3 +39,9 @@ ln -s ~/Dropbox/Public/Photo\ Booth/ ~/Pictures/Photo\ Booth
# now you can record photobooth videos quickly and they upload to dropbox DURING RECORDING
# then you grab public URL and send off your video message in a heartbeat.




# chrome canary as default
# on a mac you can set chrome canary as your default inside of Safari preferences :)

0 comments on commit 785fc73

Please sign in to comment.