Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into relevance

  • Loading branch information...
commit d8e4f4c9035cee629a2e132cbf7956cf46548b04 2 parents 665505b + f0d6f4c
Ryan Neufeld authored
View
9 .gitignore
@@ -1,12 +1,5 @@
-autosaves/*
-auto-save-list/*
-tramp
-\#*\#
*.cache
private
*~
-joust
-elpa/archive-contents
-url
-.rvmrc
libimobiledevice
+.*.swp
View
105 zsh/aliases.zsh
@@ -1,121 +1,30 @@
-function linux() { [[ `uname -s` = "Linux" ]] }
function mac() { [[ `uname -s` = "Darwin" ]] }
-export GEMEDITOR=mvim
-
-alias r="ruby"
-
alias e="vim"
+alias jsc="/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc"
-alias gsd="git stash; git pull; git stash apply"
-alias gcd="git clean -d"
-alias grh="git reset HEAD"
-alias gac="git commit -a -m"
-alias gbl="git branch -l"
-alias gc="git commit"
-alias gcm="git commit -m"
-alias gf="git diff"
-alias gl="git log"
-alias gt="git status"
-alias gn="git clone"
-alias gco="git checkout"
-alias gs="git stash"
-alias gsa="git stash apply"
-alias gsp="git stash pop"
-alias gb="git branch"
-alias gd="git pull"
-alias gu="git push"
-alias gwc="git whatchanged"
-alias gap="git add -p"
-alias gri="git rebase -i"
-alias gsl="git stash list"
-alias gcob="git checkout -b"
-alias g="git merge"
-
-alias rs="rake spec"
-alias rdm="rake db:migrate"
-alias rdmr="rake db:migrate:redo"
-
-alias bi="bundle install"
-alias be="bundle exec"
-
-find-rakefile () {
- if [ -f $1/Rakefile ]; then
- echo $1
- else
- echo $(find-rakefile $1/..)
- fi
-}
-
-rails-script () {
- rfpath=$(find-rakefile .)
- target=$1; shift
- if [ -f $rfpath/script/rails ]; then
- $rfpath/script/rails $target $argv
- else
- $rfpath/script/$target $argv
- fi
-}
-
-sc () { rails-script "console" $argv }
-ss () { rails-script "server" $argv }
-sg () { rails-script "generate" $argv }
-sr () { rails-script "runner" $argv }
-sgm() { rails-script "generate" "migration" $argv }
-sgs() { rails-script "generate" "scaffold" $argv }
-sgr() { rails-script "generate" "resource" $argv }
-
-alias jsc="/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc"
alias cd..='cd ..'
alias ..='cd ..'
-alias u='cd ..'
-alias uu='cd ../..'
-alias uuu='cd ../../..'
-alias uuuu='cd ../../../..'
-
-alias tarx="tar xf"
-alias tarc="tar czf"
-
-alias chx="chmod +x"
-alias cmmi="./configure && make && sudo make install"
-alias slime='emacs -e slime'
alias mv='nocorrect mv'
alias cp='nocorrect cp'
alias mkdir='nocorrect mkdir'
-alias g='grep'
-alias t='tail'
-alias h='head'
-alias L='less'
-
-alias fdg="find . | grep"
-
-alias l='ls'
alias sl='ls'
+
if mac; then
alias ls="ls -GF" # for OS X
else
alias ls="ls --color=auto -F"
fi
-alias cl="clear;ls"
-alias ll="ls -l"
-alias l.='ls -d .[^.]*'
-alias lsd='ls -ld *(-/DN)'
-alias b="popd"
+alias ll="ls -l"
alias md='mkdir -p'
alias rd='rmdir'
-alias df="df -hT"
-alias scs="screen"
-alias scr="screen -r"
alias su="su -s /bin/zsh"
-if linux; then
- alias sx="startx"
- alias tsl="tail -f /var/log/syslog"
-fi
-
-alias nzb="hellanzb.py"
-
+function rn {
+ scp -r $1 prgmr:~/r
+ echo "http://ryanneufeld.ca/$1" | pbcopy
+}
View
6 zsh/completions.zsh
@@ -1,7 +1,3 @@
-# File: ~/.emacs.d/zsh/completions.zsh
-# Author: Ryan Neufeld <neufelry@gmail.com>
-# Modified: <2008-12-13 00:01:27 CST>
-
# colorful listings
zmodload -i zsh/complist
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
@@ -10,5 +6,3 @@ zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle -e ':completion::*:*:*:hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })'
autoload -U compinit
compinit
-
-
View
8 zsh/functions.zsh
@@ -1,8 +0,0 @@
-# File: ~/.emacs.d/zsh/functions.zsh
-# Author: Ryan Neufeld <neufelry@gmail.com>
-# Modified: <2008-12-13 00:09:41 CST>
-
-mdc() { mkdir -p "$1" && cd "$1" }
-setenv() { export $1=$2 }
-sdate() { date +%Y.%m.%d }
-pc() { awk "{print \$$1}" }
View
26 zsh/history.zsh
@@ -1,21 +1,9 @@
-# File: ~/.emacs.d/zsh/history.zsh
-# Author: Ryan Neufeld <neufelry@gmail.com>
-# Modified: <2008-12-15 08:45:31 CST>
-
-# This file is loaded by zshrc.zsh
-
-setopt ALL_EXPORT
-
-HISTFILE=~/.history
-HISTSIZE=10500
-SAVEHIST=10000
-SHARE_HISTORY=1
-EXTENDED_HISTORY=1
-HIST_EXPIRE_DUPS_FIRST=1
-
-# Grep the history with 'h'
-h () { history 0 | grep $1 }
-
+export HISTFILE=~/.history
+export HISTSIZE=10500
+export SAVEHIST=10000
+export SHARE_HISTORY=1
+export EXTENDED_HISTORY=1
+export HIST_EXPIRE_DUPS_FIRST=1
setopt \
appendhistory \
@@ -25,5 +13,3 @@ setopt \
auto_pushd \
pushd_silent \
correct
-
-unsetopt ALL_EXPORT
View
11 zsh/path.zsh
@@ -1,11 +0,0 @@
-# This file is loaded by zshrc.zsh
-
-setopt ALL_EXPORT
-
-MANPATH=/usr/local/share/man:$MANPATH
-
-# User Dir bins
-PATH=$HOME/bin:/usr/local/bin:$PATH
-
-CLASSPATH=.:$CLASSPATH
-unsetopt ALL_EXPORT
View
2  zsh/prompts.zsh
@@ -5,7 +5,7 @@ function build-prompt() {
esac
git=$(git-prompt)
#ruby=$(rvm-prompt u g)
-
+
#echo "%{$fg[cyan]%}%2c $git%{$fg[red]%}$ruby $statcolor▸%{$reset_color%} "
echo "%{$fg[cyan]%}%2c $git $statcolor▸%{$reset_color%} "
}
View
27 zsh/rails.zsh
@@ -0,0 +1,27 @@
+find-rakefile () {
+ if [ -f $1/Rakefile ]; then
+ echo $1
+ else
+ echo $(find-rakefile $1/..)
+ fi
+}
+
+rails-script () {
+ rfpath=$(find-rakefile .)
+ target=$1; shift
+ if [ -f $rfpath/script/rails ]; then
+ $rfpath/script/rails $target $argv
+ else
+ $rfpath/script/$target $argv
+ fi
+}
+
+sc () { rails-script "console" $argv }
+ss () { rails-script "server" $argv }
+sg () { rails-script "generate" $argv }
+sr () { rails-script "runner" $argv }
+sgm() { rails-script "generate" "migration" $argv }
+sgs() { rails-script "generate" "scaffold" $argv }
+sgr() { rails-script "generate" "resource" $argv }
+
+
View
44 zsh/rake_complete
@@ -1,44 +0,0 @@
-#!/usr/bin/env ruby
-
-# Complete rake tasks script for bash
-# Save it somewhere and then add
-# complete -C path/to/script -o default rake
-# to your ~/.bashrc
-# Xavier Shay (http://rhnh.net), combining work from
-# Francis Hwang ( http://fhwang.net/ ) - http://fhwang.net/rb/rake-complete.rb
-# Nicholas Seckar <nseckar@gmail.com> - http://www.webtypes.com/2006/03/31/rake-completion-script-that-handles-namespaces
-# Saimon Moore <saimon@webtypes.com>
-
-require 'fileutils'
-
-RAKEFILES = ['rakefile', 'Rakefile', 'rakefile.rb', 'Rakefile.rb']
-exit 0 unless RAKEFILES.any? { |rf| File.file?(File.join(Dir.pwd, rf)) }
-exit 0 unless /^rake\b/ =~ ENV["COMP_LINE"]
-
-after_match = $'
-task_match = (after_match.empty? || after_match =~ /\s$/) ? nil : after_match.split.last
-cache_dir = File.join( ENV['HOME'], '.rake', 'tc_cache' )
-FileUtils.mkdir_p cache_dir
-rakefile = RAKEFILES.detect { |rf| File.file?(File.join(Dir.pwd, rf)) }
-rakefile_path = File.join( Dir.pwd, rakefile )
-cache_file = File.join( cache_dir, rakefile_path.gsub( %r{/}, '_' ) )
-if File.exist?( cache_file ) &&
- File.mtime( cache_file ) >= (Dir['lib/tasks/*.rake'] << rakefile).collect {|x| File.mtime(x) }.max
- task_lines = File.read( cache_file )
-else
- task_lines = `rake --silent --tasks`
- File.open( cache_file, 'w' ) do |f| f << task_lines; end
-end
-tasks = task_lines.split("\n")[1..-1].collect {|line| line.split[1]}
-tasks = tasks.select {|t| /^#{Regexp.escape task_match}/ =~ t} if task_match
-
-# handle namespaces
-if task_match =~ /^([-\w:]+:)/
- upto_last_colon = $1
- after_match = $'
- tasks = tasks.collect { |t| (t =~ /^#{Regexp.escape upto_last_colon}([-\w:]+)$/) ? "#{$1}" : t }
-end
-
-puts tasks
-exit 0
-
View
11 zsh/ruby.zsh
@@ -0,0 +1,11 @@
+export GEMEDITOR=$EDITOR
+
+export RUBY_HEAP_MIN_SLOTS=1000000
+export RUBY_HEAP_SLOTS_INCREMENT=1000000
+export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
+export RUBY_GC_MALLOC_LIMIT=1000000000
+export RUBY_HEAP_FREE_MIN=500000
+
+export PATH="$HOME/.rbenv/bin:$PATH"
+
+eval "$(rbenv init -)"
View
28 zsh/titles.zsh
@@ -1,28 +0,0 @@
-function title() {
- # escape '%' chars in $1, make nonprintables visible
- a=${(V)1//\%/\%\%}
-
- # Truncate command, and join lines.
- a=$(print -Pn "%40>...>$a" | tr -d "\n")
-
- s="%39>...>$a:$3"
-
- case $TERM in
- screen)
- print -Pn "\ek$s\e\\" # screen title (in ^H")
- ;;
- xterm*|rxvt)
- print -Pn "\e]2;$2 | $a:$3\a" # plain xterm title
- ;;
- esac
-}
-
-# precmd is called just before the prompt is printed
-
-# function precmd() {
-# title "zsh" "$USER@%m" "%35<...<%~"
-# j --add "$(pwd -P)"
-# }
-
-# preexec is called just before any command line is executed
-function preexec() { title "$1" "$USER@%m" "%55<...<%~" }
View
71 zsh/zshrc.zsh
@@ -1,60 +1,23 @@
-# File: ~/.zshrc
-# Author: Ryan Neufeld <neufelry@gmail.com>
-# Modified: <2009-01-29 15:47:03 CST>
+setopt ALL_EXPORT
-export NAME="Ryan Neufeld"
-
-if [ -f /sw/bin/init.sh ]; then # OS X
- . /sw/bin/init.sh
-fi
-
-if [ -f /usr/share/gentoo/mc/mc.gentoo ]; then # gentoo linux
- . /usr/share/mc/mc.gentoo
-fi
-
-export GIT_AUTHOR_NAME=$NAME
-export GIT_COMMITTER_NAME=$NAME
-export RUBYOPT=""
-export EDITOR=vim
-export BROWSER="w3m"
-export PAGER="less"
-export SHELL="/bin/zsh"
-export VIM=~/.vim
+autoload -Uz colors && colors
+bindkey -e # emacs style key bindings
+local WORDCHARS=${WORDCHARS//\//}
setopt CORRECT
-bindkey -e
-
-autoload -Uz colors
-colors
+EDITOR=vim
+BROWSER="w3m"
+PAGER="less"
+SHELL="/bin/zsh"
+VIM=~/.vim
-. ~/.config/zsh/path.zsh
-. ~/.config/zsh/history.zsh
-
-. ~/.config/zsh/git.zsh
-. ~/.config/zsh/prompts.zsh
-. ~/.config/zsh/titles.zsh
-. ~/.config/zsh/completions.zsh
-. ~/.config/zsh/functions.zsh
-. ~/.config/zsh/aliases.zsh
-. ~/.config/zsh/relevance.zsh
-# j
-#. ~/.config/zsh/rake_completions.zsh
-
-function rn {
- scp -r $1 prgmr:~/r
- echo "http://ryanneufeld.ca/$1" | pbcopy
-}
-
-precmd_functions+=(project_precmd)
-
-local WORDCHARS=${WORDCHARS//\//}
+PATH=$HOME/bin:/usr/local/bin:$PATH
+MANPATH=/usr/local/share/man:$MANPATH
+CLASSPATH=.:$CLASSPATH
-# Ruby stuff
-export RUBY_HEAP_MIN_SLOTS=1000000
-export RUBY_HEAP_SLOTS_INCREMENT=1000000
-export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
-export RUBY_GC_MALLOC_LIMIT=1000000000
-export RUBY_HEAP_FREE_MIN=500000
-export PATH="$HOME/.rbenv/bin:$PATH"
-eval "$(rbenv init -)"
+unsetopt ALL_EXPORT
+# Load nested configs
+for f in $(find ~/.config/zsh -name \*.zsh | grep -v zshrc.zsh); do
+ . $f
+done
Please sign in to comment.
Something went wrong with that request. Please try again.