This file contains hidden or 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
| MAKEFILE=$(lastword $(MAKEFILE_LIST)) | |
| REMOTE?=$(REMOTE_USER)@$(REMOTE_HOST) | |
| REMOTE_SSH?=ssh -p $(REMOTE_PORT) | |
| REMOTE_SHELL?=$(REMOTE_SSH) $(REMOTE) $(REMOTE_LOGIN) | |
| REMOTE_MAKE?=cat $(MAKEFILE) | $(REMOTE_SHELL) make -f /dev/stdin -C $(REMOTE_BASE) | |
| # LOCAL COMMANDS: | |
| hello: |
This file contains hidden or 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
| complete -W "\`grep -oE '^[a-zA-Z0-9_-]+:([^=]|$)' Makefile | sed 's/[^a-zA-Z0-9_-]*$//'\`" make |
This file contains hidden or 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
| //Adds $.xhr and jQuery-like $.ajax methods to the prescribed namespace. | |
| //Inspired from David Flanagans excellent cross-platform utils http://www.davidflanagan.com/javascript5/display.php?n=20-1&f=20/01.js | |
| //Includes underscore.js _.each and _.extend methods | |
| //modified to behave like jQuery's $.ajax(), not complete. | |
| (function($) { | |
| var win=window, xhrs = [ | |
| function () { return new XMLHttpRequest(); }, | |
| function () { return new ActiveXObject("Microsoft.XMLHTTP"); }, | |
| function () { return new ActiveXObject("MSXML2.XMLHTTP.3.0"); }, | |
| function () { return new ActiveXObject("MSXML2.XMLHTTP"); } |
This file contains hidden or 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
| /* | |
| * This work is free. You can redistribute it and/or modify it under the | |
| * terms of the Do What The Fuck You Want To Public License, Version 2, | |
| * as published by Sam Hocevar. See the COPYING file for more details. | |
| */ | |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { |
This file contains hidden or 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
| (ns hierarchy.core | |
| (:refer-clojure :exclude [==]) | |
| (:use [clojure.core.logic])) | |
| (def order [:domain :kingdom :phylum :class :order :family :genus :species]) | |
| (def homo-sapiens | |
| {:domain :eukarya | |
| :kingdom :animalia-metazoa | |
| :phylum :chordata |
This file contains hidden or 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
| function loadScript(url, callback) { | |
| var script = document.body.appendChild(document.createElement("script")); | |
| script.onload = callback; | |
| script.src = url; | |
| } | |
| function loadScripts(scripts, callback) { | |
| dependencies.reverse().reduce(function(next, url) { | |
| return loadScript.bind(null, url, next); | |
| }, callback)(); | |
| } |
This file contains hidden or 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
| data State_t a s = State a s | |
| let unit = {} | |
| let stateMonad = { | |
| return: \x -> \s -> State x s | |
| bind: \sm f -> \s0 -> match (sm s0) | |
| case (State x s) = (f x) s | |
| } |
This file contains hidden or 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
| docs | |
| DEV_NOTES.md | |
| TESTING.md | |
| OPS_NOTES.md | |
| locale (via SVN) | |
| node_modules (not under git versioning) | |
| server | |
| bin | |
| app | |
| config |
This file contains hidden or 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
| (use '[clojure.core.match :only [match]]) | |
| (defn evaluate [env [sym x y]] | |
| (match [sym] | |
| ['Number] x | |
| ['Add] (+ (evaluate env x) (evaluate env y)) | |
| ['Multiply] (* (evaluate env x) (evaluate env y)) | |
| ['Variable] (env x))) | |
| (def environment {"a" 3, "b" 4, "c" 5}) |
This file contains hidden or 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
| function Machine(first, $){ | |
| var cur = {}, next = $[first]; | |
| var self = { | |
| go : function(to){ next = next ? next : ($[to] || $.undefined); }, | |
| trigger : function(event){ var t = cur.tx && cur.tx[event]; t && self.go(t); } | |
| }; | |
| return function(){ | |
| if(next){ | |
| cur.exit && cur.exit.call(self); | |
| cur = next; next = undefined; |