Skip to content

Instantly share code, notes, and snippets.

View jadbox's full-sized avatar

Jonathan Rose Dunlap jadbox

View GitHub Profile
@jadbox
jadbox / gist:951687b28857fde2567eb52f25a3f90c
Created November 1, 2017 17:49
onename Blockstack ID
Verifying that "jadbox.id" is my Blockstack ID. https://onename.com/jadbox
@jadbox
jadbox / gist:fe9ce720eb456973ae80c715c976dd14
Created October 30, 2017 20:36
Verifying my Blockstack ID is secured with the addres
Verifying my Blockstack ID is secured with the address 1M5RYPahPUgsWG4ZP7d54zxPcD6QQ95Cxd https://explorer.blockstack.org/address/1M5RYPahPUgsWG4ZP7d54zxPcD6QQ95Cxd
### Keybase proof
I hereby claim:
* I am jadbox on github.
* I am jadbox (https://keybase.io/jadbox) on keybase.
* I have a public key whose fingerprint is 6AB5 5704 974A 7E2C DE68 9072 117E 7CFD 299C 41F3
To claim this, I am signing this object:
@jadbox
jadbox / gist:c8379b023cc2cebcea4d28cde84feb9f
Created March 23, 2017 00:44 — forked from BenderV/gist:44901bac756ff3b8279d018eb1e2cc1f
#Podcast Knowledge Project: Naval Ravikant
Just do something, doesn't matters what
Book == blog archives. Feel free to scram
We are creatures of habits (but don't condition habits with identity/ego). Have deliberate habits
Stopping alcohol
Unpack causes
- availability
- desire
Availability => Early morning sport. Force to not go out at night too much.
Desire
@jadbox
jadbox / latency.markdown
Created October 8, 2016 22:06 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@jadbox
jadbox / gist:0d25accd3d752ad6fb99dee3a3a83ae8
Created July 27, 2016 00:40
Macbook Pro Retina 11,2 -- Debian Jessie 8.0 Installation

OS and i3

  • Debian Jessie (8.0) Minimal Installation
  • Guided partitioning
  • Only enable system utilities, disable Debian Desktop Environment and Print Server

Login as root

apt-get install sudo
adduser <youruser> sudo
Node6:
#[Mean = 18267.195, StdDeviation = 5206.857]
#[Max = 27852.800, Total count = 147705]
#[Buckets = 27, SubBuckets = 2048]
----------------------------------------------------------
222902 requests in 30.01s, 90.77MB read
Socket errors: connect 0, read 0, write 0, timeout 244
Requests/sec: 7427.31
Transfer/sec: 3.02MB
Node6:
#[Mean = 18267.195, StdDeviation = 5206.857]
#[Max = 27852.800, Total count = 147705]
#[Buckets = 27, SubBuckets = 2048]
----------------------------------------------------------
222902 requests in 30.01s, 90.77MB read
Socket errors: connect 0, read 0, write 0, timeout 244
Requests/sec: 7427.31
Transfer/sec: 3.02MB
@jadbox
jadbox / gist:ae3065eb348b77e8bbcf94cc7181d04d
Created June 25, 2016 19:07 — forked from ralph-tice/gist:c2943aa672aaa65ecb59
PostgreSQL settings to aggressively vacuum, this config was used for an 18000 TPS steadystate workload on i2.xlarge
#------------------------------------------------------------------------------
# AUTOVACUUM PARAMETERS
#------------------------------------------------------------------------------
#autovacuum = on # Enable autovacuum subprocess? 'on'
# requires track_counts to also be on.
log_autovacuum_min_duration = 0 # -1 disables, 0 logs all actions and
# their durations, > 0 logs only
# actions running at least this number
# of milliseconds.
import {Stream} from 'most'
const fromNodeCallBack = fn => (...args) => new Stream(new CallBackSource(fn, args))
class CallBackSource {
constructor (fn, args) {
this.fn = fn
this.args = args
}