start new:
tmux
start new with session name:
tmux new -s myname
package main | |
import ( | |
"html/template" | |
"io" | |
"net/http" | |
"os" | |
) | |
//Compile templates on start |
package main | |
import ( | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
) | |
type HttpConnection struct { |
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 |
# Kernel sysctl configuration file for Red Hat Linux | |
# | |
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and | |
# sysctl.conf(5) for more details. | |
# Controls source route verification | |
net.ipv4.conf.default.rp_filter = 1 | |
# Do not accept source routing | |
net.ipv4.conf.default.accept_source_route = 0 |
/* | |
ptr_inspect.c | |
Demonstration code; shows how to trace the system calls in a child | |
process with ptrace. Only works on 64-bit x86 Linux for now, I'm | |
afraid. (Even worse, it's only tested on Linux 2.6....) | |
The callname() function looks clunky and machine-generated because it | |
*is* clunky and machine-generated. |