Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Merge #241

Closed
wants to merge 25 commits into from

3 participants

Mohit Kanwal Paul Irish Mathias Bynens
Mohit Kanwal

No description provided.

bdd desimone referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 24, 2012
  1. Paul Irish

    readme update for meee

    paulirish authored
  2. Paul Irish

    renaming

    paulirish authored
  3. bringing in my aliases/function to these dotfiles.

    Paul Irish authored
  4. Paul Irish

    adding my aliases to git

    paulirish authored
  5. Paul Irish
  6. Paul Irish

    iterm title bar attempt #2

    paulirish authored
  7. Paul Irish
Commits on Jan 26, 2012
  1. Paul Irish

    add url

    paulirish authored
  2. Paul Irish

    .bash_profile: Be sure to source `.bash_prompt` first, in case it set…

    authored paulirish committed
    …s the PATH and subsequent dotfiles rely on it
Commits on Jan 27, 2012
  1. Paul Irish
Commits on Feb 6, 2012
  1. Paul Irish

    i have determined that i do not like pulling with rebase. no more reb…

    paulirish authored
    …ase for me. merge commits ftw
Commits on Feb 8, 2012
  1. Paul Irish

    init z

    paulirish authored
Commits on Feb 13, 2012
  1. Paul Irish

    f find shorthand

    paulirish authored
Commits on Mar 28, 2012
  1. Paul Irish

    no hub alias.

    paulirish authored
Commits on Apr 17, 2012
  1. Paul Irish
Commits on May 2, 2012
  1. Paul Irish
Commits on May 30, 2012
  1. Paul Irish
Commits on May 31, 2012
  1. Paul Irish

    start up rvm

    paulirish authored
  2. Paul Irish
Commits on Jun 19, 2012
  1. Paul Irish

    pretty git log

    paulirish authored
  2. Paul Irish

    lg for log, paul.

    paulirish authored
  3. Paul Irish

    more git alias fun.

    paulirish authored
  4. Paul Irish
Commits on Jun 21, 2012
  1. Paul Irish

    thanks steve streza. :)

    paulirish authored
Commits on Jun 27, 2012
  1. Paul Irish

    subl

    paulirish authored
This page is out of date. Refresh to see the latest.
31 .aliases
View
@@ -4,6 +4,21 @@ alias ...="cd ../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"
+# ssh!
+alias shh='ssh aurgasm@aurgasm.us'
+alias shhve='ssh paul@javascriptbattle.com'
+
+# programs
+alias slt='open -a "Sublime Text 2"'
+alias subl='open -a "Sublime Text 2"'
+
+# be nice
+alias please=sudo
+
+# handy things
+alias bunyip='node ~/code/bunyip/cli.js'
+
+
# List all files colorized in long format, including dot files
alias la="ls -Gla"
@@ -18,9 +33,23 @@ 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'
+
+# GIT STUFF
+
# 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`'
+
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en1"
@@ -88,4 +117,4 @@ done
# Stuff I never really use but cannot delete either because of http://xkcd.com/530/
alias stfu="osascript -e 'set volume output muted true'"
alias pumpitup="osascript -e 'set volume 10'"
-alias hax="growlnotify -a 'Activity Monitor' 'System error' -m 'WTF R U DOIN'"
+alias hax="growlnotify -a 'Activity Monitor' 'System error' -m 'WTF R U DOIN'"
13 .bash_profile
View
@@ -1,10 +1,17 @@
-# Load ~/.bash_prompt, ~/.exports, ~/.aliases, ~/.functions and ~/.extra
+# Load ~/.extra, ~/.bash_prompt, ~/.exports, ~/.aliases and ~/.functions
# ~/.extra can be used for settings you don’t want to commit
-for file in ~/.{bash_prompt,exports,aliases,functions,extra}; do
+for file in ~/.{extra,bash_prompt,exports,aliases,functions}; do
[ -r "$file" ] && source "$file"
done
unset file
+# init z https://github.com/rupa/z
+. ~/code/z/z.sh
+
+# init rvm
+source ~/.rvm/scripts/rvm
+
+
# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob
@@ -17,4 +24,4 @@ export LANG="en_US"
# Add tab completion for `defaults read|write NSGlobalDomain`
# You could just use `-g` instead, but I like being explicit
-complete -W "NSGlobalDomain" defaults
+complete -W "NSGlobalDomain" defaults
14 .bash_prompt
View
@@ -34,6 +34,7 @@ else
RESET="\033[m"
fi
+
function parse_git_dirty() {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
@@ -42,4 +43,15 @@ function parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
}
-PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]"
+# iTerm Tab and Title Customization and prompt customization
+# http://sage.ucsc.edu/xtal/iterm_tab_customization.html
+
+# Put the string " [bash] hostname::/full/directory/path"
+# in the title bar using the command sequence
+# \[\e]2;[bash] \h::\]$PWD\[\a\]
+
+# Put the penultimate and current directory
+# in the iterm tab
+# \[\e]1;\]$(basename $(dirname $PWD))/\W\[\a\]
+
+PS1="\[\e]2;$PWD\[\a\]\[\e]1;\]$(basename "$(dirname "$PWD")")/\W\[\a\]\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]"
47 .functions
View
@@ -3,6 +3,20 @@ function md() {
mkdir -p "$@" && cd "$@"
}
+
+# find shorthand
+function f() {
+ find . -name "$1"
+}
+
+
+# lets toss an image onto my server and pbcopy that bitch.
+function scpp() {
+ scp "$1" aurgasm@aurgasm.us:~/paulirish.com/i;
+ echo "http://paulirish.com/i/$1" | pbcopy;
+ echo "Copied to clipboard: http://paulirish.com/i/$1"
+}
+
# Start an HTTP server from a directory, optionally specifying the port
function server() {
local port="${1:-8000}"
@@ -12,6 +26,20 @@ function server() {
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"
}
+# git log with per-commit cmd-clickable GitHub URLs (iTerm)
+function gf() {
+ local remote="$(git remote -v | awk '/^origin.*\(push\)$/ {print $2}')"
+ [[ "$remote" ]] || return
+ local user_repo="$(echo "$remote" | perl -pe 's/.*://;s/\.git$//')"
+ git log $* --name-status --color | awk "$(cat <<AWK
+ /^.*commit [0-9a-f]{40}/ {sha=substr(\$2,1,7)}
+ /^[MA]\t/ {printf "%s\thttps://github.com/$user_repo/blob/%s/%s\n", \$1, sha, \$2; next}
+ /.*/ {print \$0}
+AWK
+ )" | less -F
+}
+
+
# Test if HTTP compression (RFC 2616 + SDCH) is enabled for a given URL.
# Send a fake UA string for sites that sniff it instead of using the Accept-Encoding header. (Looking at you, ajax.googleapis.com!)
function httpcompression() {
@@ -29,6 +57,23 @@ function json() {
fi
}
+
+# take this repo and copy it to somewhere else minus the .git stuff.
+function gitexport(){
+ mkdir -p "$1"
+ git archive master | tar -x -C "$1"
+}
+
+
+
+# get gzipped size
+function gz() {
+ echo "orig size (bytes): "
+ cat "$1" | wc -c
+ echo "gzipped size (bytes): "
+ gzip -c "$1" | wc -c
+}
+
# All the dig info
function digga() {
dig +nocmd "$1" any +multiline +noall +answer
@@ -44,4 +89,4 @@ function escape() {
function unidecode() {
perl -e "binmode(STDOUT, ':utf8'); print \"$@\""
echo # newline
-}
+}
13 .gitconfig
View
@@ -1,11 +1,18 @@
+[alias]
+ c = commit -am
+ up = pull
+ p = push
+ s = status -s
+ df = diff --color --color-words --abbrev
+ lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
+[color]
+ ui = always
[apply]
whitespace = fix
[core]
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
whitespace = fix,space-before-tab,tab-in-indent,trailing-space
-[color]
- ui = auto
[color "branch"]
current = yellow reverse
local = yellow
@@ -32,4 +39,4 @@
pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/"
[url "git://gist.github.com/"]
- insteadOf = "gist:"
+ insteadOf = "gist:"
12 .vimrc
View
@@ -18,7 +18,9 @@ set noeol
" Centralize backups, swapfiles and undo history
set backupdir=~/.vim/backups
set directory=~/.vim/swaps
-set undodir=~/.vim/undo
+if exists("&undodir")
+ set undodir=~/.vim/undo
+endif
" Enable line numbers
set number
@@ -53,9 +55,11 @@ set shortmess=atI
set showmode
" Show the filename in the window titlebar
set title
-" Use relative line numbers
-set relativenumber
-au BufReadPost * set relativenumber
+if exists("&relativenumber")
+ " Use relative line numbers
+ set relativenumber
+ au BufReadPost * set relativenumber
+endif
" Start scrolling three lines before the horizontal window border
set scrolloff=3
53 README.md
View
@@ -1,53 +0,0 @@
-# Mathias’s dotfiles
-
-## Installation
-
-### Using Git and the bootstrap script
-
-```bash
-git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles && ./bootstrap.sh
-```
-
-To update, `cd` into your local `dotfiles` repository and then:
-
-```bash
-./bootstrap.sh
-```
-
-Alternatively, to update while avoiding the confirmation prompt:
-
-```bash
-./bootstrap.sh -f
-```
-
-### Git-free install
-
-To install these dotfiles without Git:
-
-```bash
-cd; curl -#L https://github.com/mathiasbynens/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh}
-```
-
-To update later on, just run that command again.
-
-### Sensible OS X defaults
-
-When setting up a new Mac, you may want to set some sensible OS X defaults:
-
-```bash
-./.osx
-```
-
-## Feedback
-
-Suggestions/improvements
-[welcome](https://github.com/mathiasbynens/dotfiles/issues)!
-
-## Thanks to…
-
-* [Gianni Chiappetta](http://gf3.ca/) for sharing his [amazing collection of dotfiles](https://github.com/gf3/dotfiles)
-* [Matijs Brinkhuis](http://hotfusion.nl/) and his [homedir repository](https://github.com/matijs/homedir)
-* [Jan Moesen](http://jan.moesen.nu/) and his [ancient `.bash_profile`](https://gist.github.com/1156154) + [shiny tilde repository](https://github.com/janmoesen/tilde)
-* [Ben Alman](http://benalman.com/) and his [dotfiles repository](https://github.com/cowboy/dotfiles)
-* [Tim Esselens](http://devel.datif.be/)
-* anyone who [contributed a patch](https://github.com/mathiasbynens/dotfiles/contributors) or [made a helpful suggestion](https://github.com/mathiasbynens/dotfiles/issues)
30 readme.md
View
@@ -0,0 +1,30 @@
+# Paul's dotfiles.. a fork of mathias's..
+
+## Installation
+
+### Using Git and the bootstrap script
+
+```bash
+git clone https://github.com/paulirish/dotfiles.git && cd dotfiles && ./bootstrap.sh
+```
+
+### Git-free install
+
+```bash
+cd; curl -#L https://github.com/paulirish/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh}
+```
+
+To update later on, just run that command again.
+
+### Sensible OS X defaults
+
+When setting up a new Mac, you may want to set some sensible OS X defaults:
+
+```bash
+./.osx
+```
+
+## upstream
+
+Suggestions/improvements
+[welcome back upstream](https://github.com/mathiasbynens/dotfiles/issues)!
Something went wrong with that request. Please try again.