Skip to content

Instantly share code, notes, and snippets.

View lukehedger's full-sized avatar
🍵
(ू˃̣̣̣̣̣̣︿˂̣̣̣̣̣̣ ू)

Luke Hedger lukehedger

🍵
(ू˃̣̣̣̣̣̣︿˂̣̣̣̣̣̣ ू)
View GitHub Profile
@lukehedger
lukehedger / metadata-sig.js
Created October 13, 2017 13:35
Download and process META-ID metadata signature from Swarm
web3.bzz.download(metadataAddress.slice(2))
.then(rawMetadata =>
Object.keys(rawMetadata).map(path => ({
[`${path}`]: JSON.parse(rawMetadata[path].data.toString())
}))
.reduce((o, v) => Object.assign({}, o, v), {})
)
.then(metadata => console.log(metadata))
function first(prop1) {
console.log(prop1)
return function (prop2) {
console.log(prop1 + prop2)
}
}
first(1)(2) // => 1, 3
@lukehedger
lukehedger / keybase_proof.md
Created September 28, 2017 09:13
Keybase proof

Keybase proof

I hereby claim:

  • I am lukehedger on github.
  • I am lh4 (https://keybase.io/lh4) on keybase.
  • I have a public key ASATvlHL40KlmdZ69VS6IJMdDQWOVJme1EObsbSK-q5whAo

To claim this, I am signing this object:

RangeError: Maximum call stack size exceeded
at pad (webpack:///./node_modules/web3/packages/web3-eth-accounts/node_modules/eth-lib/src/bytes.js?:61:13)
at pad (webpack:///./node_modules/web3/packages/web3-eth-accounts/node_modules/eth-lib/src/bytes.js?:62:32)
at pad (webpack:///./node_modules/web3/packages/web3-eth-accounts/node_modules/eth-lib/src/bytes.js?:62:32)
at pad (webpack:///./node_modules/web3/packages/web3-eth-accounts/node_modules/eth-lib/src/bytes.js?:62:32)
at pad (webpack:///./node_modules/web3/packages/web3-eth-accounts/node_modules/eth-lib/src/bytes.js?:62:32)
at pad (webpack:///./node_modules/web3/packages/web3-eth-accounts/node_modules/eth-lib/src/bytes.js?:62:32)
at pad (webpack:///./node_modules/web3/packages/web3-eth-accounts/node_modules/eth-lib/src/bytes.js?:62:32)
at pad (webpack:///./node_modules/web3/packages/web3-eth-accounts/node_modules/eth-lib/src/bytes.js?:62:32)
at pad (webpack:///./node_modules/web3/packages/web3-eth-accounts/node_modules/
@lukehedger
lukehedger / cheekyArray.js
Created August 25, 2017 11:39
Create iterable Array of fixed length
[...Array(4)]
0xD17236a6D5800b9e0966514E56AEB72bFeBEcd04
0x6B503da8E07fc114D4E164e7Ef5f49cca5d81958
0x92Ea561678D3b3D9f587C4089C5019B32abD9F5f
// For each unit test you write,
// answer these questions:
describe('What component aspect are you testing?', () => {
it('What should the feature do?', () => {
const actual = 'What is the actual output?'
const expected = 'What is the expected output?'
expect(actual).toEqual(expected)
@lukehedger
lukehedger / r-pi-vnc.md
Last active August 9, 2018 04:43
Setup VNC between Raspberry Pi and OSX