Skip to content

Instantly share code, notes, and snippets.

@chetan
chetan / yardoc_cheatsheet.md
Last active May 10, 2024 02:53
YARD cheatsheet
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
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

@centminmod
centminmod / gist:9034414
Created February 16, 2014 13:43
Wordpress Multi Site Nginx configuration template for CentminMod.com Nginx - based on Sam Smith's configuration at https://plus.google.com/b/104831941868856035845/106999818358907937014/posts/YN2sCBjxg2A
server {
server_name domain1.com www.domain1.com domain2.com www.domain2.com;
# ngx_pagespeed & ngx_pagespeed handler
include /usr/local/nginx/conf/pagespeed.conf;
include /usr/local/nginx/conf/pagespeedhandler.conf;
include /usr/local/nginx/conf/pagespeedstatslog.conf;
access_log /home/nginx/domains/domain1.com/log/access.log combined buffer=32k;
error_log /home/nginx/domains/domain1.com/log/error.log;