Skip to content

Instantly share code, notes, and snippets.

@andy-leonard
andy-leonard / gist:9077193
Last active August 29, 2015 13:56
"knife solo data bag" in a cookbook - outside of a chef-solo repo
# Create secret key:
openssl rand -base64 512 | tr -d '\r\n' > test/integration/edb_secret
# Create EDB:
knife solo data bag create pgsql_creds postgres --secret-file test/integration/edb_secret \
--data-bag-path test/data_bags
# This creates:
#
# test/data_bags
@jboner
jboner / latency.txt
Last active May 3, 2024 15:17
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
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
@bhenerey
bhenerey / ideal ops.md
Created May 23, 2012 19:40
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@alecperkins
alecperkins / gist:2083178
Created March 18, 2012 22:30
Dump content from posterous
"""
# Dump your data from Posterous.
Requires:
* Posterous username and password
* An API Token from http://posterous.com/api
* Posterous site id also from http://posterous.com/api
* The Python libraries requests and python-dateutil