Skip to content

Instantly share code, notes, and snippets.

View stoodder's full-sized avatar

Rick Allen stoodder

  • RA Consulting, LLC
  • Milwaukee
View GitHub Profile
042b2e74a4966412f57559e3e806caa8e96f399da8e3e475a9ba40f16269ed85466a07123115461242025a9572e2537bd5641b1352a3dae6cd4965cc2d77f56dba;jmatty1983
sinonMatchers = {}
sinonToJasmineMap =
'called': 'toHaveBeenCalled'
'calledOnce': 'toHaveBeenCalledOnce'
'calledTwice': 'toHaveBeenCalledTwice'
'calledThrice': 'toHaveBeenCalledThrice'
'calledBefore': 'toHaveBeenCalledBefore'
'calledAfter': 'toHaveBeenCalledAfter'
'calledOn': 'toHaveBeenCalledOn'
'alwaysCalledOn': 'toHaveBeenAlwaysCalledOn'
#Helper for Handlebars
def hb(expression, &block)
if block
#Used for block format -hb("if testing") do ...
haml_concat( "{{##{expression}}}" )
tab_up
block.call
tab_down
haml_concat( "{{/#{expression.split[0]}}}" )
else
09:18:01 dev.1 | Sequel::Error - associated object #<User @values={:id=>79, :crypted_password=>"01e750063a55551f6f0692e62721814843cc59a530811428171aad2d77715a7929efe15b9dfe8bda1e743fb7e157a79371fee958b1f186a8ecd0f783d0c446a4a34539a4fddf33e6170fd3f48b3cb070d82e33eaaf2ad46e90ed59cf85f0c7b4", :updated_on=>2013-01-15 02:06:58 -0600, :created_on=>2013-01-15 02:06:15 -0600, :picture_url=>nil, :email=>"stoodder@gmail.com", :dob=>nil, :lat=>nil, :lng=>nil, :location=>nil, :stripe_id=>"cus_16cM5qD7LPX1h7", :recieve_notifications=>nil, :facebook_id=>nil, :first_name=>"Rick", :last_name=>"Allen", :agreed_to_terms=>true, :gender=>nil, :address1=>nil, :address2=>nil, :city=>nil, :state=>nil, :country=>nil, :postal_code=>nil, :phone=>nil, :emergency_name=>nil, :emergency_relationship=>nil, :emergency_number=>nil, :special_considerations=>nil, :reset_password=>nil, :reset_date=>nil, :card_type=>"Visa", :card_last4=>"4242", :card_exp_month=>"8", :card_exp_year=>"2015", :card_name=>"Rick Allen"}> not of correct type User:
09
@stoodder
stoodder / jqFileupload.coffee
Created February 8, 2012 16:54
A jquery handler for file upload, also uses jquery buttons
# Rudimentary binding to call the 'option' method on jQuery UI buttons
# Based on https://github.com/thelinuxlich/knockout_bindings/
ko.bindingHandlers.jqButton =
update: (element, valueAccessor) ->
options = valueAccessor()
options = {} unless _.isObject(options)
options[key] = ko.utils.unwrapObservable(value) for key, value of options
$(element).button(options)