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:
| <!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> |
| # uses gem github_api | |
| # http://peter-murach.github.com/github (thanks!) | |
| # | |
| require 'github_api' | |
| require 'csv' | |
| class OmniGitHub | |
| # converts OmniFocus export to issues with labels in GutHub repository |
| 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 |
| 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?> }} |
| class EmailAddressScrubber | |
| DUMMY = '@yahoo.com' unless defined?(DUMMY) | |
| CANDIDATES = %w(TestingInferences.com CoordinationSystem.com DifficultConversation.com Undiscussible.com RelationshipEffectiveness.com Coordinated-Action.com OptimizeAlignment.com AlignmentOptimization.com) unless defined?(CANDIDATES) | |
| def scrub(address) | |
| x = address[1].ord % CANDIDATES.size | |
| collapse(address.sub(DUMMY, "@#{CANDIDATES[x]}")) | |
| end |
| # | |
| # Nginx proxy for Elasticsearch + Kibana | |
| # | |
| # In this setup, we are password protecting the saving of dashboards. You may | |
| # wish to extend the password protection to all paths. | |
| # | |
| # Even though these paths are being called as the result of an ajax request, the | |
| # browser will prompt for a username/password on the first request | |
| # | |
| # If you use this, you'll want to point config.js at http://FQDN:80/ instead of |
| 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) |
I hereby claim:
To claim this, I am signing this object:
| # From http://stackoverflow.com/a/13423584/153896 | |
| module ActiveRecord | |
| class QueryCounter | |
| attr_reader :query_count | |
| def initialize | |
| @query_count = 0 | |
| end | |
| def to_proc |
| /** | |
| * 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 { |