- BIP32 - is a method for generating a tree of private keys from a master private key.
- BIP39 - is a method for encoding 128-256 bits of random data into 12-24 word phrases from a list of interchangeable 2018 words, and then turn those phrases into a 64-byte hash.
- BIP44 - is a method for structuring a private key tree in a specific way that will facilitate usage/restoration/discovery of multiple accounts for multiple purposes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import event | |
import os | |
import logging | |
import sqlalchemy | |
import boto3 | |
import base64 | |
import json | |
from botocore.exceptions import ClientError | |
logger = logging.getLogger() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-env jest */ | |
import _ from 'lodash' | |
import path from 'path' | |
import fs from 'fs' | |
import callsites from 'callsites' | |
import knex from 'knex' | |
import hash from 'object-hash' | |
import conf from '<conf>' | |
// Get the db config. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const solc = require('solc'); | |
const Web3 = require('web3'); | |
// Connect to local Ethereum node | |
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); | |
// Compile the source code | |
const input = fs.readFileSync('Token.sol'); | |
const output = solc.compile(input.toString(), 1); |
- install dnsmasq
$ brew install dnsmasq
...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
- edit
/usr/local/etc/dnsmasq.conf
address=/local/127.0.0.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, PropTypes } from 'react'; | |
import { reduxForm, Field } from 'redux-form'; | |
export class CreateUser extends Component { | |
static propTypes = { | |
createUser: PropTypes.func.isRequired, | |
initialValues: PropTypes.object, | |
submitting: PropTypes.bool.isRequired, | |
invalid: PropTypes.bool.isRequired, |
While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.
Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.
lib/
is intended for code that can run as-issrc/
is intended for code that needs to be manipulated before it can be used
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin <branch-name> |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
NewerOlder