I hereby claim:
- I am kumavis on github.
- I am kumavis (https://keybase.io/kumavis) on keybase.
- I have a public key whose fingerprint is 6750 E5FB B48E 01F1 D3AB 6BEE 9AC5 DEA8 D6AD D69B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| start (secret) -> return apiObject with [encrypt, decrypt] with plaintext secret stored in closure | |
| encrypt (input) -> generate salt, iv, additionalData, -> generate hash from salt and secret -> generate key from hash -> encrypt with key -> return json string with salt, iv, additionalData, and encrypted data (edited) | |
| decrypt(input) -> read salt, iv, additionalData -> generate hash from salt and secret -> generate key from hash -> decrypt with key -> return unecrypted data | |
| and the 'encrypted text' includes plaintext metadata about the encryption settings (salt, iv, additionalData) |
| ;(function () { | |
| function c() { | |
| var e = document.createElement("link"); | |
| e.setAttribute("type", "text/css"); | |
| e.setAttribute("rel", "stylesheet"); | |
| e.setAttribute("href", f); | |
| e.setAttribute("class", l); | |
| document.body.appendChild(e) | |
| } | |
| function h() { |
| ╭─{👘 } kumavis in ~/Development/Node/ethereum-address-generator | |
| ╰─± node example.js | |
| Looking for an address starting with "abc". | |
| tried 1000 identities. | |
| tried 2000 identities. | |
| tried 3000 identities. | |
| tried 4000 identities. | |
| tried 5000 identities. | |
| tried 6000 identities. | |
| Found after 6110 attempts! |
| 10:46 <kumavis> maybe components could have some generic channel-generating hooks ? | |
| 10:46 <kumavis> render() { return inputBox( state.label, state.channels.bindValue('label') ) } | |
| 10:47 <kumavis> which could simplify to inputBox( state, 'label' ) | |
| 10:47 <kumavis> so i dont have to create a channel that only updates a value directly passed in | |
| 10:48 <kumavis> right now i have to do inputBox(state.newIdentityAddress, state.channels.updateNewIdentityAddress) | |
| 10:48 <kumavis> function updateNewIdentityAddress(state, data) { | |
| 10:48 <kumavis> state.newIdentityAddress.set(data.text) | |
| 10:48 <kumavis> } | |
| 10:48 <kumavis> its just a lot of code to do one simple thing i feel | |
| 10:56 ⇐ alexandergugel quit ([email protected]) Remote host closed the connection |
| nm = NumberMachine() | |
| nm.multiply(2) | |
| nm.add(6) | |
| nm.subtract(3) | |
| nm.multiply(2) | |
| nm(10) //=> 46 | |
| nm(0) //=> 6 | |
| nm(20) //=> 86 |
First define your component:
var Value = require('observ')
var Component = require('../lib/component.js')
var Wallet = require('../wallet/index.js')
var Identity = require('../identity/index.js')
var render = require('./render.js')| std=["top", "window", "location", "external", "chrome", "document", "define", "global", "cr", "ntp", "templateData", "Handler", "i18nTemplate"];Object.keys(window).filter(function(item){return std.indexOf(item)===-1}) |
| function* addGenerator() { | |
| var i = 0; | |
| while (true) { | |
| i += yield i; | |
| } | |
| } | |
| var adder = addGenerator(); | |
| adder.next().value; // 0 | |
| adder.next(5).value; // 5 |
| var koa = require('koa'); | |
| var app = koa(); | |
| // logger | |
| app.use(function *(next){ | |
| var start = new Date; | |
| yield next; | |
| var ms = new Date - start; | |
| console.log('%s %s - %s', this.method, this.url, ms); |