Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
fn quick-sort [li]{ | |
if <= (count $li) 1; then | |
put $@li | |
else | |
quick-sort [(each { if <= $0 $li[0]; then put $0; fi } $li[1:])] | |
put $li[0] | |
quick-sort [(each { if > $0 $li[0]; then put $0; fi} $li[1:])] | |
fi | |
} |
#!/bin/bash -e | |
NETNS_FILE=/var/run/netns/mynet | |
MNTNS_FILE=/var/run/ns/mynet_mnt | |
if [[ ! -f $NETNS_FILE ]]; then | |
ip netns add mynet | |
ip link add mynet0 type veth peer name mynet1 | |
ip link set mynet0 up |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
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 |