This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH=/usr/local/bin:$PATH | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function | |
# Git autocomplete | |
source ~/.git-completion.bash | |
# Git dirty state in prompt | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActionView | |
module Helpers | |
module FormTagHelper | |
def uneditable_tag(method, name, opts={}) | |
if yield | |
send method, name, opts | |
else | |
value = defined?(object) ? object.send(name) : opts[:value] | |
content_tag :span, value, opts.merge({ :class => "uneditable-input #{opts.delete(:class)}" }) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bind changes in content. Skip general keypresses. | |
$.fn.onValChange = (callback) -> | |
# IE < 9 | |
usePropertyChange = true | |
this.on("propertychange.onValChange", (e) => | |
callback.call(this) if (e.originalEvent.propertyName == "value") | |
return | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# =============================================================== | |
# ESCAPE - the COMMAND CHARACTER | |
# =============================================================== | |
# escape ^aa # default | |
# escape ^pp # suggested binding for emacs users | |
# escape ` # backtick | |
# | |
escape `` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module KawaiiPhrase | |
# Makes awesome random phrases such as "Enjoyable Green Turtle" | |
ADJ_1 = [ | |
'epic', | |
'tasty', | |
'shiny', | |
'mega', | |
'ultra', | |
'hyper', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Originally from http://bit.ly/GIhZmg | |
# modified by @colour to reflect locations of assets in the asset pipeline | |
namespace :spec do | |
desc "Add files that DHH doesn't consider to be 'code' to stats" | |
task :statsetup do | |
require 'rails/code_statistics' | |
class CodeStatistics | |
alias calculate_statistics_orig calculate_statistics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------- | |
# new communication protocol checker for jesse farmer! | |
# | |
# Author: ayumi yu | |
# Created: 06.10.2011 | |
# Last mod: 08.10.2011 | |
# Licence: MIT | |
#------------------------------------------------------------------------------- | |
#!/usr/bin/env python |
NewerOlder