This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Periodically call the condition promise, resolves when the condition resolves | |
poll = (condition, interval=1000, timeout=60000)-> | |
promise = Q.promise (resolve, reject)-> | |
start = _.now() | |
test = -> | |
_duration = _.now() - start | |
if _duration > timeout | |
reject "Polling timeout of #{ timeout }ms exceeded." | |
else | |
Q.fcall(condition).then resolve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Q = require 'q' | |
exec = Q.denodify require('child_process').exec | |
nodes = for i in [1..10] | |
-> exec "deploy.sh -n=#{ i }" | |
makeDeploySet = (start, end) | |
-> | |
set = (deploy() for deploy in nodes[start..end]) | |
$.when.apply null, set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ds.define = do -> | |
modules = { | |
ds | |
$ | |
_: _.noConflict() | |
Backbone | |
Breakpoints | |
Raven: window.Raven | |
key: key.noConflict() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
266s Total: 131s Deploying, 126s Building, 9s in Build Queue. | |
126s Building | |
Build 100s | |
-------------------------------------------> | |
Python Unit Tests | |
---> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fisher yates shuffle algorithm | |
# http://en.wikipedia.org/wiki/Fisher–Yates_shuffle | |
Array::shuffle = -> | |
copy = @copy() | |
i = @length | |
while --i | |
j = Math.floor(Math.random() * (i + 1)) | |
temp = copy[i] | |
copy[i] = copy[j] | |
copy[j] = temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>All work and no play makes Jack a dull boy.</title> | |
<style type="text/css" media="screen"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>All work and no play makes Jack a dull boy.</title> | |
<style type="text/css" media="screen"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>All work and no play makes Jack a dull boy.</title> | |
<style type="text/css" media="screen"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[extensions] | |
fetch = | |
[ui] | |
ssh = ssh -C | |
username = Wes Rogers <wes@cocodesign.com> | |
[extensions] | |
hgext.extdiff = | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var InteractiveRadioField = Class.create({ | |
initialize: function(name, pairs, activateFunction, inactivateFunction){ | |
this.name = name; | |
this.fields = $$('input[type=radio][name=' + this.name + ']'); | |
this.pairs = $H(pairs); | |
this.activateFunction = activateFunction; | |
this.inactivateFunction = inactivateFunction; | |
this.changed = false; | |
this.elementsToBeShown = $$(this.pairs.map(function(pair){ | |
return '#' + pair.key; |
OlderNewer