I hereby claim:
- I am wulftone on github.
- I am wulftone (https://keybase.io/wulftone) on keybase.
- I have a public key ASA5gAnhddkyQNChAG7nJfZqpcIM5EML67L74--1rquhogo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
(function(){ | |
// Save a reference to the global object (`window` in the browser, `exports` | |
// on the server). | |
var root = this, | |
// Save the previous value of the `Factorial` variable, so that it can be | |
// restored later on, if `noConflict` is used. | |
previousFactorial = root.Factorial, | |
// The top-level namespace. All public Factorial classes and modules will |
### | |
source: http://blog.gaslight.co/page/3 | |
Debounce a function so it only executes once, after all inputs to it have ended, or after | |
a specified timeout interval. Optionally pass another argument to your debounced function | |
to execute it immediately, for example: `myDebouncedFunction( some, arguments, { now: true } )` | |
@example An Ember.js controller example usage | |
App.DocumentController = Ember.ObjectController.extend |
#! /usr/bin/ruby | |
# This file is intended to be used for a specific trello project, but the principle | |
# displayed here of extracting data from a trello json export file can be used in | |
# a wide variety of ways. Edit this file to your heart's content! | |
# | |
# Put this file in the same folder as "lindy-hop-thesaurus.json" (or whatever your | |
# Trello export file is called... and run it from the command line like this: | |
# | |
# ruby print_json.rb lindy-hop-thesaurus.json |
#!/usr/bin/env ruby | |
# Usage: | |
# | |
# ./mon git 0.3 # => will monitor "git" every 0.3 seconds until it dies | |
start = Time.now | |
user = `whoami`.strip | |
name = ARGV[0] | |
frequency = (ARGV[1] || 1).to_f # Default to 1 second if second argument not given |
[ | |
{ | |
"class": "label_control", | |
"color": [255, 255, 255], | |
"shadow_color": [24, 24, 24], | |
"shadow_offset": [0, -1] | |
}, | |
{ | |
"class": "button_control", | |
"content_margin": [6, 5, 6, 6], |
<!ELEMENT note (to,from,heading,body)> | |
<!ELEMENT to (#PCDATA)> | |
<!ELEMENT from (#PCDATA)> | |
<!ELEMENT heading (#PCDATA)> | |
<!ELEMENT body (#PCDATA)> |
# If you have ruby installed, you can use this file to run a basic web server | |
# and avoid silly cross-site forgery issues when doing your assignments. | |
# | |
# * Install ruby, if you haven't already | |
# Macs come with ruby, so just open up a terminal and type: ruby -v | |
# and press Return (or Enter or whatever). If you get a response, | |
# you have ruby already! Move to the next step. If not, consult Google. | |
# | |
# Windows users can easily install ruby, just check out http://rubyinstaller.org/ | |
# When you're done installing, open up a command prompt (or powershell) and |
rivets.configure({ | |
adapter: { | |
subscribe: function(obj, keypath, callback) { | |
if (obj instanceof Backbone.Collection) { | |
obj.on('add remove reset', function () { | |
callback(obj[keypath]) | |
}); | |
} else { | |
obj.on('change:' + keypath, function (m, v) { callback(v) }); | |
}; |