start new:
tmux
start new with session name:
tmux new -s myname
| wifi-menu | |
| ping www.google.com | |
| # setup disk partitions | |
| cfdisk. | |
| # format disk partitions | |
| lsblk /dev/sda | |
| mkfs.ext4 /dev/sda1 | |
| mkfs.ext4 /dev/sda2 |
| user www-data; | |
| worker_processes 1; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| sendfile on; |
| # URI of the local (caching) HTTP proxy | |
| LOCAL_HTTP_PROXY = 'http://192.168.33.200:8123' | |
| # Configures vagrant-cachier and vagrant-proxyconf. | |
| # Should be called only on "local machine" providers. | |
| def configure_caching(config) | |
| if Vagrant.has_plugin?('vagrant-cachier') | |
| config.cache.enable_nfs = true | |
| config.cache.enable :gem | |
| config.cache.enable :npm |
| import mesosphere.mesos.util.FrameworkInfo | |
| import org.apache.mesos.MesosSchedulerDriver | |
| /** | |
| * @author Tobi Knaup | |
| */ | |
| object Main extends App { |
| #!/bin/bash | |
| # | |
| # Example of how to parse short/long options with 'getopt' | |
| # | |
| OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"` | |
| if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi | |
| echo "$OPTS" |
| # tunnel - secure tunnel to my vps | |
| description "ssh tunnel" | |
| start on (local-filesystems and network-device-up IFACE!=lo) | |
| stop on runlevel [!12345] | |
| respawn | |
| respawn limit 5 60 # respawn max 5 times in 60 seconds | |
| umask 022 |
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
| 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 |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # David Lutz's Multi VM Vagrantfile | |
| # inspired from Mark Barger's https://gist.github.com/2404910 | |
| boxes = [ | |
| { :name => :web, :role => 'web_dev', :ip => '192.168.33.1', :ssh_port => 2201, :http_fwd => 9980, :cpus =>4, :shares => true }, | |
| { :name => :data, :role => 'data_dev', :ip => '192.168.33.2', :ssh_port => 2202, :mysql_fwd => 9936, :cpus =>4 }, | |
| { :name => :railsapp, :role => 'railsapp_dev', :ip => '192.168.33.3', :ssh_port => 2203, :http_fwd => 9990, :cpus =>1} | |
| ] |