Skip to content

Instantly share code, notes, and snippets.

View nathanpalmer's full-sized avatar

Nathan Palmer nathanpalmer

  • Crowd Ox
  • Washington, DC
View GitHub Profile
@nathanpalmer
nathanpalmer / 3.html
Created September 12, 2012 14:47 — forked from getify/3.html
how "grips" templating handles it, in response to https://gist.github.com/3696453
<script id="template" type="text/x-jquery-tmpl">
<h1>Settings</h1>
{{each(name,setting) settings}}
<h2>${name}</h2>
{{each(index,value) ['low','high']}}
<input type="radio" name="${name}" value="${value}" {{if setting === value}}checked{{/if}}> ${value}
{{/each}}
{{/each}}
</script>
function __fish_hg_prompt --description 'Promp function for Mercurial'
# Colors
set -l color_branch (set_color magenta)
set -l color_cleanslate (set_color green)
set -l color_added (set_color green)
set -l color_modified (set_color blue)
set -l color_removed (set_color red)
set -l color_unknown (set_color magenta)
set -l color_deleted (set_color cyan)
set -l color_renamed (set_color yellow)
var httpResponseQueue = Ember.A();
var checkQueueInterval = null;
var checkQueue = function() {
for (var i = 0; i < httpResponseQueue.length; i++) {
var queuedItem = httpResponseQueue[i];
var found = fakehr.match(queuedItem.verb.toUpperCase(), queuedItem.url);
if (found) {
found.respond(queuedItem.status || 200, {'content-type': 'application/json'}, queuedItem.body);