git diff --no-prefix > [path file name]
patch -p0 < [path file name]
As configured in my dotfiles.
start new:
tmux
start new with session name:
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
var Redis = require('redis-stream') | |
, client = new Redis(6379, 'localhost', process.argv[2] || 0) | |
, stream = client.stream() | |
var keys = client.stream('keys') | |
process.stdin | |
.pipe(Redis.es.split()) | |
.pipe(keys) | |
.pipe(Redis.es.mapSync(function (key) { |
#!/usr/bin/env node | |
// Reads JSON from stdin and writes equivalent | |
// nicely-formatted JSON to stdout. | |
var stdin = process.stdin, | |
stdout = process.stdout, | |
inputChunks = []; | |
stdin.resume(); |
This is a guide on how to email securely.
There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.
var crypto = require('crypto'); | |
// larger numbers mean better security, less | |
var config = { | |
// size of the generated hash | |
hashBytes: 32, | |
// larger salt means hashed passwords are more resistant to rainbow table, but | |
// you get diminishing returns pretty fast | |
saltBytes: 16, | |
// more iterations means an attacker has to take longer to brute force an |
#!/usr/bin/env node | |
var args = process.argv.slice(2); | |
var input = args[0]; | |
var isTTY = process.stdin.isTTY; | |
var stdin = process.stdin; | |
var stdout = process.stdout; | |
// If no STDIN and no arguments, display usage message |
A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.
The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.