Skip to content

Instantly share code, notes, and snippets.

Avatar
🍵
(ू˃̣̣̣̣̣̣︿˂̣̣̣̣̣̣ ू)

Luke Hedger lukehedger

🍵
(ू˃̣̣̣̣̣̣︿˂̣̣̣̣̣̣ ू)
View GitHub Profile
@lukehedger
lukehedger / metadata-sig.js
Created Oct 13, 2017
Download and process META-ID metadata signature from Swarm
View metadata-sig.js
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))
View curry.js
function first(prop1) {
console.log(prop1)
return function (prop2) {
console.log(prop1 + prop2)
}
}
first(1)(2) // => 1, 3
View keybase_proof.md

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:

View signTransactionError.js
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 Aug 25, 2017
Create iterable Array of fixed length
View cheekyArray.js
[...Array(4)]
View gist:d0d0b46b0352ddb76f3a6bc981ad4459
0x92Ea561678D3b3D9f587C4089C5019B32abD9F5f
View answer-unit-test-questions-jest.js
// 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 Aug 9, 2018
Setup VNC between Raspberry Pi and OSX