Skip to content

Instantly share code, notes, and snippets.

View evanworley's full-sized avatar

Evan Worley evanworley

View GitHub Profile

Keybase proof

I hereby claim:

  • I am evanworley on github.
  • I am evanworley (https://keybase.io/evanworley) on keybase.
  • I have a public key ASD7KnP9ae2e5_PEZUF9bBkSQd4nirO_g7E0RaCvpuk5bgo

To claim this, I am signing this object:

ko.extenders.progressiveArray = (target, opts = {}) ->
target.progressive = _.extend({
batchSize: 10
}, opts)
# Utility function for adding without value mutation events
target.add ?= (item) -> target().push(item)
target.clear ?= () -> target([])
target.updateProgressive = (items) ->
@evanworley
evanworley / make_fast.js
Last active September 30, 2015 04:58
make_fast implementation
function make_fast(fn) {
var memo = {};
return function (val) {
if(memo[val] === undefined) {
memo[val] = fn(val);
}
return memo[val];
};
}
matches << {:type => Sample.to_s, :matches => tokens.map{|token| matching_samples(token)}.inject(:&)}
#! /bin/bash
if [ $# -lt 2 ]; then
echo "Usage testFastPath.sh CONSUMER_KEY CONSUMER_SECRET"
exit
fi
# Create a fresh rails project
rails testFastPath
cd testFastPath
ActionView::TemplateError (You have a nil object when you didn't expect it!
The error occurred while evaluating nil.reset_key) on line #16 of app/views/main/feedback.html.haml:
13: var feedback_widget = new GSFN.feedback_widget(feedback_widget_options);
14:
15: - unless session_account.nil?
16: = FastPass.script(FASTPASS_KEY, FASTPASS_SECRET, session_account.email, session_account.first_name, session_account.id)
/usr/local/lib/ruby/gems/1.9.1/gems/ruby-hmac-0.3.2/lib/hmac.rb:101:in `ensure in digest'
/usr/local/lib/ruby/gems/1.9.1/gems/ruby-hmac-0.3.2/lib/hmac.rb:101:in `digest'
oauth (0.3.6) lib/oauth/signature/hmac/base.rb:9:in `digest'
ActionView::TemplateError (You have a nil object when you didn't expect it!
The error occurred while evaluating nil.reset_key) on line #16 of app/views/main/feedback.html.haml:
13: var feedback_widget = new GSFN.feedback_widget(feedback_widget_options);
14:
15: - unless session_account.nil?
16: = FastPass.script(FASTPASS_KEY, FASTPASS_SECRET, session_account.email, session_account.first_name, session_account.id)
/usr/local/lib/ruby/gems/1.9.1/gems/ruby-hmac-0.3.2/lib/hmac.rb:101:in `ensure in digest'
/usr/local/lib/ruby/gems/1.9.1/gems/ruby-hmac-0.3.2/lib/hmac.rb:101:in `digest'
oauth (0.3.6) lib/oauth/signature/hmac/base.rb:9:in `digest'
FastPass.script(FASTPASS_KEY, FASTPASS_SECRET, session_account.email, session_account.first_name, session_account.id)