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> | |
<meta charset="utf-8"> | |
<style> | |
svg { | |
fill: none; | |
stroke: #300; | |
stroke-width: 4px; | |
stroke-linecap: round; | |
} |
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> | |
<title>series normalization per mouse-x (in d3.js)</title> | |
<style> | |
svg .chart { | |
fill: none; | |
stroke: #000; | |
stroke-width: 2px; | |
} | |
svg rect.mouse { | |
fill: none; |
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
Verifying that +timjames is my openname (Bitcoin username). https://onename.com/timjames |
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
Show hidden characters
{ | |
"font_size": 17.0, | |
"ignored_packages": ["Vintage"], | |
"trim_trailing_white_space_on_save": true, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"LOOK MA NO COMMA": true | |
} |
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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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 |
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
# 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
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
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 |
NewerOlder