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
const pipe = <T, K>( | |
iterable: IterableIterator<T>, | |
seed: K, | |
fn: (a: T) => K | |
): T => { | |
const iterator: IterableIterator<T> = iterable[Symbol.iterator]() | |
if (iterable instanceof GeneratorFunction) { | |
iterator.next() | |
} |
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 show (currency) { | |
let parent | |
let child | |
if (document.getElementById(currency).checked) { | |
parent = document.querySelector('#content') | |
child = parent.insertCell(0) | |
child.id = currency | |
} | |
} |
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
var sqlite = require('sqlite3') | |
var db = new sqlite.Database('/home/tomato/.mozilla/firefox/kbp250uo.dev/places.sqlite') | |
function each (query) { | |
return new Promise((resolve, reject) => { | |
try { | |
db.each(query, resolve) | |
} catch (exception) { | |
reject(exception) |
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
/** | |
* Effective | |
*/ | |
* { margin: 0; body: 0; } | |
html,body{ height:100%; } | |
body{ | |
background: #333; | |
padding: 4em; | |
} | |
article#credits { |