Title | Seen | Rating ★☆ |
---|---|---|
24 | ☑ | ★★☆☆☆ |
Ash vs Evil Dead | ☒ | ? |
Bates Motel | ☑ | ★★★☆☆ |
Battlestar Galactica | ☒ | ? |
Better Call Saul | ☑ | ★★★★★ |
Black Mirror | ☑ | ★★★★★ |
Black Sails | ☒ | ? |
Breaking Bad | ☑ | ★★★★★ |
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 opts = {headers: {Authorization: "Basic " + require("btoa")("test:test")}}; | |
var c = new (require("kinto-http"))("http://0.0.0.0:8888/v1", opts); | |
var schema = {"type": "object", "properties": {"n": {"type": "number"}}}; | |
var displayFields = ["n"]; | |
c.createBucket("buck") | |
.then(() => c.bucket("buck").createCollection("coll", { | |
data: {schema, displayFields} | |
})) | |
.then(() => { |
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> | |
<html><meta charset="utf-8"></head> | |
<body> | |
<script> | |
window.navigator.serviceWorker.register("worker.js", {scope: "/"}) | |
.then(reg => console.log("registered", reg)) | |
.catch(err => console.error("service worker error", err)) | |
</script> | |
</body> | |
</html> |
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
function add(){var a,v,n,f;a=[].slice.call(arguments),v=a[0]||0;if(a.length){n=a.slice(1).reduce(function(s,x){return s+x},v),f=add.bind(0,n);f.valueOf=function(){return n};return f}return v} | |
function test(a, b) { | |
if (a == b) { | |
console.log('OK'); | |
} else { | |
console.log(a + ' != ' + b); | |
} | |
} |
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
#!/bin/sh | |
# This checks for .only remaining in js mocha test files and prevent | |
# commiting if any. | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object |
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 Dexie = require("dexie"); | |
var db = new Dexie("articles2"); | |
db.version(1).stores({articles: "id++,title,archived"}); | |
db.open(); | |
db.on("error", function(err) { | |
console.error(err); | |
}); | |
db.articles.add({title: "plop", archived: "true"}).catch(console.error.bind(console)).then(function(id) { | |
console.log(id); |
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 client = require("rest").wrap(require("rest/interceptor/jsonp")); | |
client({path: 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0', params: { q: 'javascript' } }).then(function (response) { | |
console.log(response); | |
}); |
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 client = require("rest/client/jsonp"); | |
client({ | |
path: 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0', | |
params: { q: 'javascript' } | |
}).then(function(response) { | |
console.log("success", response); | |
}).catch(function(response) { | |
console.error("errored", response); | |
}); |
While trying to explain Flux to a friend using words, I realized that a diagram's worth a thousand of them, and went with this.
+---------------------+
| |
| Dispatcher |
+-->| +---------------+
| +----------|----------+ |