Skip to content

Instantly share code, notes, and snippets.

View cvega's full-sized avatar
🎛️
git commit -m '[FIXED] - *'

Casey Vega cvega

🎛️
git commit -m '[FIXED] - *'
  • GitHub Staff
  • San Francisco, CA
  • 09:08 (UTC -07:00)
  • LinkedIn in/caseyvega
View GitHub Profile
@cvega
cvega / sed cheatsheet
Last active November 24, 2020 19:56 — forked from un33k/sed cheatsheet
sed cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@cvega
cvega / latency.txt
Created January 31, 2017 16:48 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
// external/public order testing (requires casperjs, and conf.js)
//
// we have a json file (conf.js) that contains all of our services, the tiers
// related to those services and litle & co certification billing/transaction
// data. We use this data to drive the tests and loop over each tier of service
// with each type of card transaction data.
casper.options.waitTimeout = 60000;
casper.start();
casper.then(function() {