I hereby claim:
- I am robhurring on github.
- I am robh (https://keybase.io/robh) on keybase.
- I have a public key whose fingerprint is 433D 3918 FF86 850F 4293 9BB4 9957 F49F 5C33 DE2A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env sh | |
# Turn a short-lived access token into a long(er) lived access token. | |
# To use this you must first generate a short-lived access token using the | |
# graph API (https://developers.facebook.com/tools/explorer/) | |
# | |
# NOTE: make sure you select your app under the "Application" dropdown. if you | |
# don't you will see an error from this saying something about your app and | |
# not having permission/access | |
# |
require 'thread' | |
module Actor | |
class << self | |
def included(base) | |
base.extend(ClassMethods) | |
end | |
def current | |
Thread.current[:actor] |
/u/local: pwd b3bb610 | |
/usr/local | |
~/P/proccli: pwd master da99d97 2↓ ✽ | |
/Users/rob/Projects/proccli |
require 'byebug' | |
require 'benchmark' | |
require 'timeout' | |
module Decorator | |
def decorate(method, &block) | |
decorator = Module.new do | |
define_method(method, &block) | |
end |
(function($) { | |
// scan our ajax response for replaceable content blocks then update the HTML | |
var updateContent = function(content) { | |
var $contentKeyElements = $(content).filter('[data-content-key]'); | |
$contentKeyElements.each(function() { | |
var node = $(this); | |
var key = node.attr('data-content-key'); | |
$('[data-content-key=' + key + ']').replaceWith(node); | |
}); |
{ | |
// http://eslint.org/docs/rules/ | |
"ecmaFeatures": { | |
"arrowFunctions": false, // enable arrow functions | |
"binaryLiterals": false, // enable binary literals | |
"blockBindings": false, // enable let and const (aka block bindings) | |
"classes": false, // enable classes | |
"defaultParams": false, // enable default function parameters | |
"destructuring": false, // enable destructuring |
class Timer extends React.Component { | |
constructor(props) { | |
super(props) | |
this._interval = null; | |
this.state = { | |
ticks: 0 | |
} | |
} |
# ./spec/support/save_tracker.rb | |
module SaveTracker | |
extend ActiveSupport::Concern | |
included do | |
class_attribute :_save_tracker_ | |
self.reset_save_tracker! | |
end | |
module ClassMethods |
var UserSelect = React.createClass({ | |
_changed: function(event) { | |
var value = this.refs.box.getDOMNode().value; | |
this.props.onSelect(value); | |
}, | |
render: function() { | |
var items = this.props.items.map(function(item) { | |
return ( | |
<option value={item}>{item}</option> |