Skip to content

Instantly share code, notes, and snippets.

View jhsu's full-sized avatar
💀
compliant with future standards

Joe Hsu jhsu

💀
compliant with future standards
  • MineHub
  • New York, NY
  • X @jhsu
View GitHub Profile
HISTSIZE=1000
SAVEHIST=1000
export EDITOR=vim
export PATH="${PATH}:${HOME}/bin"
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/zsh/oh-my-zsh
export ams_dir=$HOME/apps/ams
export JDOTS=$HOME/.jdots
if [[ -s $HOME/.ams/scripts/ams ]] ; then source $HOME/.ams/scripts/ams ; fi
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
hg root >/dev/null 2>/dev/null && echo '☿' && return
echo '○'
}
PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info)
$(prompt_char) '
RPROMPT="..."
# Final Countdown
# config.middleware.use Roll
class Roll
def initialize(app)
@app = app
end
def call(env)
request = Rack::Request.new(env)
ip = request.ip
rvm gemset use global
gem install rake wirble --no-rdoc --no-ri
echo "require 'wirble'; Wirble.init; Wirble.colorize" >> ~/.irbrc
@jhsu
jhsu / git.rb
Created April 2, 2010 14:42 — forked from defunkt/gist:4169
# by bryan helmkamp with slight modification by chris wanstrath
# from http://www.brynary.com/2008/8/3/our-git-deployment-workflow
module GitCommands
extend self
def diff_staging
`git fetch`
puts `git diff origin/production origin/staging`
end
13:43 Window : #2
13:43 Size : 139x31
13:43 Level : NONE
13:43 Server : Freenode
13:43 Bounds : Name Server tag
13:43 : #ams_dev freenode sticky
13:43 Items : Name Server tag
13:43 CHANNEL: #ams_dev Freenode
@requirement = criterion.requirement
@applicant_requirements = @requirement.applicant_requirements.of(@applicant).all
gpas_by_requirement = render_to_string :partial => "applicants/gpas_by_requirement", :locals => {:applicant_requirements => @applicant_requirements}
render :json => {...., :gpas_by_requirement => gpas_by_requirement}
# bash completion for Ruby Version Manager (RVM)
__rvm_comp()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
COMPREPLY=($(compgen -W "$1" -- "$cur"))
return 0
}
__rvm_subcommand()
From ad700a5c42519db6d1e751598a6b74d7111ee19b Mon Sep 17 00:00:00 2001
From: Joseph Hsu <[email protected]>
Date: Sat, 10 Apr 2010 15:11:27 -0400
Subject: [PATCH] fix commands and add default & system to rubies completion
---
scripts/completion | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/scripts/completion b/scripts/completion
rvm gemset use global; gem install wirble
echo "require 'wirble'; Wirble.init; Wirble.colorize" > ~/.irbrc