Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
alert("hello world!"); |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Some scripts for working with Boot2Docker and the Docker mongodb image (https://registry.hub.docker.com/u/dockerfile/mongodb/)
mongo-cli.sh
opens an interactive mongo shell
mongo-restore.sh
will fetch a zip, unpack it and mongorestore
a contained dump
prompt.sh
will open an interactive shell in the running docker instance
var concat = require("concat-stream"); | |
var hyperquest = require("hyperquest"); | |
var Promise = require("bluebird"); | |
var stream = require("stream"); | |
// Wait for the request to finish or fail | |
function promisify(req) { | |
return new Promise(function (resolve, reject) { | |
req.on("error", reject).pipe(concat({ encoding: "string" }, resolve)); |
this.addEventListener('fetch', function(event) { | |
var cachedResponse = caches.match(event.request).catch(function() { | |
return event.default().then(function(response) { | |
// With the assumption that this is an async operation... | |
// (who reads specs anyway, and besides it's returning a promise) | |
// ...store the response to the cache in parallel. | |
caches.get('v1').then(function(cache) { | |
cache.put(event.request, response.clone()); | |
}); | |
Jake Archibald (@jaffathecake): The ServiceWorker is coming; look busy
https://speakerdeck.com/jaffathecake/the-serviceworker-is-coming-look-busy
https://github.com/jakearchibald/trained-to-thrill/
https://www.youtube.com/watch?v=SmZ9XcTpMS4
Hunter Loftis (@hunterloftis): We Will All Be Game Progmrammers
http://wwabgp.herokuapp.com/s
http://youtu.be/QX0eauXBKwc
CarterRabasa (@carterrabasa): A Community of People; Not Projects
tabkill () { | |
ps ux | \ | |
grep '[C]hrome Helper --type=renderer' | \ | |
grep -vi "Canary" | \ | |
grep -v extension-process | \ | |
tr -s ' ' | \ | |
cut -d ' ' -f2 | \ | |
xargs kill | |
} |
React.createBackboneComponent = function (spec, compname) { | |
return React.createClass(_.extend({ | |
// Assistants | |
serializeState: function () { | |
this.replaceState(this.serialize()); | |
}, | |
getModel: function () { | |
return this.props.model; | |
}, | |
el: function () { |
var u = require("underscore"); | |
var q = require("q"); | |
var cheerio = require("cheerio"); | |
var hyperquest = require("hyperquest"); | |
var concat = require("concat-stream"); | |
function trim(str) { | |
return str.trim(); | |
} |
{ | |
"name": "moment-demo", | |
"version": "0.0.0", | |
"authors": [ | |
"Niklas Lindgren <niklas@sc5.io>" | |
], | |
"description": "localisation inclusion demo", | |
"dependencies": { | |
"moment": "~2.5.0", | |
"requirejs": "~2.1.10" |