I hereby claim:
- I am tjchambers on github.
- I am tjchambers (https://keybase.io/tjchambers) on keybase.
- I have a public key whose fingerprint is BD43 BA87 BEEC 388A E656 ED97 D35D C57D ABC0 60CA
To claim this, I am signing this object:
class CSV | |
def self.open(file, options={}, &block) | |
encoding = options.delete(:encoding) | |
File.open(file, "r:#{encoding}") do |fd| | |
yield CSV.new(fd, options) | |
end | |
end | |
end |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<title>Simple Radar Chart</title> | |
<link rel="stylesheet" href="style.css"/> | |
<script src="http://mbostock.github.com/d3/d3.js?2.5.0"></script> | |
<script src="radar.js"></script> | |
</head><body><h1>Simple Radar Chart</h1> | |
<div id="viz"> | |
</div> |
= javascript_include_tag 'searcher' | |
.text-right{ style: 'padding-bottom:14px;font-size:1.2em' } | |
.fa.fa-search.ico-place | |
%input{ style: '-webkit-appearance:searchfield;font-family: FontAwesome;', | |
type: 'search', | |
placeholder: 'Search ...', | |
onKeyUp: 'ds(this.value)', | |
onClick: 'ds(this.value)', | |
size: 27, | |
id: 'search_box' } |
= javascript_include_tag 'searcher' | |
.text-right{ style: 'padding-bottom:14px;font-size:1.2em' } | |
.fa.fa-search.ico-place | |
%input{ style: '-webkit-appearance:searchfield;font-family: FontAwesome;', | |
type: 'search', | |
placeholder: 'Search ...', | |
onKeyUp: 'ds(this.value)', | |
onClick: 'ds(this.value)', | |
size: 27, | |
id: 'search_box' } |
/** | |
* Created by tj on 12/26/14. | |
*/ | |
function ds(text) { | |
searchless(text); | |
$('.searchable').each(function () { | |
if (text.length < 2 || $(this).html().replace(/<\/?[^>]+>/gi, '|').search(r) >= 0) { | |
$(this).show(); | |
} else { |
# From http://stackoverflow.com/a/13423584/153896 | |
module ActiveRecord | |
class QueryCounter | |
attr_reader :query_count | |
def initialize | |
@query_count = 0 | |
end | |
def to_proc |
I hereby claim:
To claim this, I am signing this object:
namespace :mutant do | |
MUTANT_VERSION = `mutant --version`.strip.split('-').last | |
def complete?(log) | |
content = File.read(log) | |
/Kills:/.match(content) | |
end | |
def preface(file, base) |
2.0.0-p195 :001 > require 'dalli' | |
=> true | |
2.0.0-p195 :002 > | |
2.0.0-p195 :003 > memcache ||= Dalli::Client.new | |
=> #<Dalli::Client:0x007fb753ccf210 @servers=["127.0.0.1:11211"], @options={}, @ring=nil> | |
2.0.0-p195 :004 > a = :dalli_store, '127.0.0.1', | |
2.0.0-p195 :005 > {:namespace => lambda { | |
2.0.0-p195 :006 > generation = $memcache.incr 'mv|' + Rails.env, 1, 0, 1 | |
2.0.0-p195 :007?> "#{generation.to_s}.#{Time.now.strftime('%j')}" | |
2.0.0-p195 :008?> }} |
require 'dalli' | |
memcache ||= Dalli::Client.new | |
a = :dalli_store, '127.0.0.1', | |
{:namespace => lambda { | |
generation = $memcache.incr 'mv|' + Rails.env, 1, 0, 1 | |
"#{generation.to_s}.#{Time.now.strftime('%j')}" | |
}} | |
memcache.incr 'test',0,0,0 |