<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
var u = (function() { | |
var id = function(x) { return x; } | |
, single = function(x) { return [x]; } | |
, constant = function(x) { return function() { return x; }}; | |
var curried = function(f, n, args) { | |
return (args.length >= n) | |
? f.apply(null, args) | |
: function() { return curried(f, n, args.concat(slice(arguments))); }; }; |
var empty_list = function(selector) { | |
return selector(undefined, undefined, true); | |
}; | |
var prepend = function(el, list) { | |
return function(selector) { | |
return selector(el, list, false); | |
}; | |
}; | |
var head = function(list) { |
# applescript | |
# add login item | |
osascript -e 'tell application "System Events" to make login item at end with properties {name: "Notes",path:"/Applications/Notes.app", hidden:false}' | |
# delete login item | |
osascript -e 'tell application "System Events" to delete login item "itemname"' | |
# list loginitems | |
osascript -e 'tell application "System Events" to get the name of every login item' |
var List = (function() { | |
function List(src) { | |
this._list = null | |
this._length = 0 | |
if(src instanceof List) { | |
this._list = src._list | |
this._length = src._length | |
} | |
} |
upstream upstream-apache2 { | |
server 127.0.0.1:8080; | |
} | |
upstream upstream-nodejs { | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; |
console.log("\033[39mRunning tests…"); | |
function assertEquals(actual, expected, description) { | |
if(typeof(actual) === "undefined") { | |
console.error("\033[31m" + description + " not implemented\033[39m"); | |
} else { | |
if(actual !== expected) { | |
console.error("\033[31m" + description + " failed, expected " + expected + ", got " + actual + "\033[39m"); | |
} else { | |
console.log(description + " \033[32m ok\033[39m"); | |
} |
console.log("\033[39mRunning tests…"); | |
function assertEquals(actual, expected, description) { | |
if(typeof actual === "undefined") { | |
console.error("\033[31m" + description + " not implemented\033[39m"); | |
} else { | |
if(actual !== expected) { | |
console.error("\033[31m" + description + " failed, expected " + expected + ", got " + actual + "\033[39m"); | |
} else { | |
console.log(description + " \033[32m ok\033[39m"); | |
} |
var makeIterable = require('./make-iterable'); | |
// Returns an iterator to the Fibonacci sequence. | |
function fibonacci() { | |
var prev = 0; | |
var curr = 1; | |
return makeIterable({ | |
next: function () { | |
var tmp = curr; |
function Cont(contHandler) { | |
this.contHandler = contHandler; | |
}; | |
Cont.unit = function(value) { | |
return new Cont(function (continue) { return continue(value); }); | |
}; | |
Cont.prototype.run = function(resume) { | |
return this.contHandler(resume); |