Skip to content

Instantly share code, notes, and snippets.

View harunsmrkovic's full-sized avatar
:electron:
decoding

Harun Smrkovic harunsmrkovic

:electron:
decoding
View GitHub Profile
@a1phanumeric
a1phanumeric / gist:5346170
Created April 9, 2013 14:35
Grep exclusions. Demonstrates how to exclude multiple directories, and files.
grep -r --color --exclude-dir={custom,lib,scripts} --exclude={*.xml,error_log} "beta" .
@ctavan
ctavan / mutatable.jsx
Created January 17, 2017 12:13
mutatable react HOC
import hoistNonReactStatic from 'hoist-non-react-statics';
import React from 'react';
function getDisplayName(WrappedComponent) {
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
}
// See: https://facebook.github.io/react/docs/higher-order-components.html
export default function mutatable({ mutationName = 'mutate' } = {}) {
return (SourceComponent) => {
const bip39 = require("bip39");
const bip32 = require("ripple-bip32");
const ripple = require('ripple-keypairs')
var mnemonic = 'novel matter final only nice cheese address cradle civil crash great flame struggle consider crowd surface purpose saddle mango endless mixed trial tape wrap'
// Or generate:
// mnemonic = bip39.generateMnemonic()
console.log('mnemonic: ' + mnemonic)
const seed = bip39.mnemonicToSeed(mnemonic) // add second argument for 25th word encrypted