The following compares the output of several creative hash functions designed for human readability.
sha1's are merely used as arbitrary, longer, distributed input values.
input | 1 word output | 2 word output | 3 word output |
---|
const waterfall = require('promise.waterfall') | |
const Bluebird = require('bluebird') | |
const _ = require('lodash') | |
// an array of 10ms functions with different return values | |
const functions = [ | |
() => Bluebird.delay(10, 'a'), | |
() => Bluebird.delay(10, 'b'), | |
() => Bluebird.delay(10, 'c') | |
] |
The following compares the output of several creative hash functions designed for human readability.
sha1's are merely used as arbitrary, longer, distributed input values.
input | 1 word output | 2 word output | 3 word output |
---|
web3.currentProvider.sendAsync({ | |
jsonrpc: “2.0”, | |
method: “evm_increaseTime”, | |
params: [60], // 60 seconds, may need to be hex, I forget | |
id: new Date().getTime() // Id of the request; anything works, really | |
}, function(err) { | |
// ... | |
}); |
const reducers = {} | |
// these could be easily split up across different files | |
reducers.FETCH_RESULT = (state, result) => Object.assign({}, { myData: result.myData }, state } | |
reducers.ADD_ITEM = (state, item) => Object.assign({}, { items: state.items.concat(item) }, state } | |
reducers.REMOVE_ITEM = (state, item) => Object.assign({}, { items: ... }, state } | |
// the main reducer | |
reducer = (state, action) => { | |
return reducers[action.type](state, action.data) |
https://github.com/ziman/lightyear | |
idris JsonTest.idr -p lightyear -p contrib | |
parse jsonToplevelValue "{ \"a\": 1, \"b\": 2 }" |
git config user.email "Full Name" | |
git config user.email "example@gmail.com" |
it('should throw an error', cb => { | |
const result = aMethodThatRejects() | |
result.then(x => { cb('Expected error. Instead got ' + x) })) | |
result.catch(() => cb()) | |
}) |
_ |
/* | |
UPDATE: This is now a Chrome Extension: https://chrome.google.com/webstore/detail/memrise-export/hcllgkpmoiolndnhmbdceffaidjmkoam | |
Source Code: https://github.com/raineorshine/memrise-export | |
Export Memrise course words to CSV (technically TSV, or "tab separated file", but it is effectively the same). | |
1. Log into Memrise. | |
2. Navigate to the course page you would like to export (e.g. https://app.memrise.com/course/2156672/german-random-01/). | |
3. Open the browser's Developer Console (https://support.airtable.com/hc/en-us/articles/232313848-How-to-open-the-developer-console) |