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
class PeopleController < ApplicationController | |
before_filter :authenticate_user!, :except => [:index, :show] | |
... | |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Blackboard.tmTheme", | |
"font_size": 14.0, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"word_wrap": false, | |
"zzz": 0 | |
} |
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:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin | |
# export JAVA_HOME=$(/usr/libexec/java_home) | |
# export LD_LIBRARY_PATH=/usr/local/lib/ | |
alias ll='ls -al' | |
alias m='mate' | |
alias mw='mate -w' | |
alias .p='. ~/.bashrc' | |
alias ep='mw ~/.bashrc; .p' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>D3 - Line Chart - axes and grid using axis()</title> | |
<!-- script type="text/javascript" src="https://raw.github.com/jquery/sizzle/master/sizzle.js"></script --> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.min.js"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.time.min.js"></script> | |
<style type="text/css"> | |
body { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>D3 - Line Chart - continuous function</title> | |
<!-- script type="text/javascript" src="https://raw.github.com/jquery/sizzle/master/sizzle.js"></script --> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.min.js"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.time.min.js"></script> | |
<style type="text/css"> | |
body { |
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
commit 56d2a064e942243cd601b3b5ac1ec48004a02664 | |
Author: Jared Grippe and Rex Chung and Tim James <[email protected]> | |
Date: Mon Apr 23 18:35:27 2012 -0700 | |
added a failing test for a case when RR.mock breaks objects that use method_missing like Redis::Namespace | |
diff --git a/spec/rr/double_injection/double_injection_spec.rb b/spec/rr/double_injection/double_injection_spec.rb | |
index be2109b..d9ade8c 100644 | |
--- a/spec/rr/double_injection/double_injection_spec.rb | |
+++ b/spec/rr/double_injection/double_injection_spec.rb |
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
def mr | |
# total_sponsor_amount = sum{|d| d.amount * dollars_per_locale_currency_unit(d.locale)} | |
reduce = { | |
usd_per_could_sponsor: ->(d){d.usd / d.could_count}, | |
usd_per_did_sponsor: ->(d){d.usd / d.did_count}, | |
} | |
map = { |
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
# Provides JSON-safe division, === with a fudge factor, allowance of integer division | |
class SafeFloat | |
FUDGE = 0.0000001 | |
def initialize v | |
@v = v | |
end | |
def / other | |
# p "#{@v} / #{other.to_f} == #{@v / other.to_f}" | |
self.class.new(@v / other.to_f) if other != 0 # nil instead of NaN | |
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 "^R" em-inc-search-prev | |
bind ^I rl_complete |
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
echo bash | |
parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'; } | |
PS1="________________________________________________________\n\u@\h \w\[\e[0;33;49m\]\$(parse_git_branch)\[\e[0;0m\]\n\$ " | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
if [ -f `brew --prefix`/etc/bash_completion ]; then |
OlderNewer