start new:
tmux
start new with session name:
tmux new -s myname
(by @andrestaltz)
So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
# sfdisk -d /dev/xvdb to obtain disk geometry output to use below | |
# | |
# Format ephemeral disk into partition for swap on /dev/xvdb2 | |
sfdisk /dev/xvdb <<EOF | |
unit: sectors | |
/dev/xvdb1 : start= 2048, size=209715200, Id=83 |
#!/bin/sh | |
DEBUG="" | |
DATE=$(date +%Y-%m-%d) | |
HOSTNAME=`/bin/hostname` | |
AMINAME="$DATE-$HOSTNAME-AMI" | |
AMIDESC="$HOSTNAME backup to AMI on $DATE" | |
EC2_INSTANCE_ID="`wget -q -O - http://169.254.169.254/latest/meta-data/instance-id || die \"wget instance-id has failed: $?\"`" | |
test -n "$EC2_INSTANCE_ID" || die 'cannot obtain instance-id' |
en | |
conf t | |
aaa new-model | |
aaa authentication login default local | |
aaa authorization exec default local | |
aaa session-id common | |
ip ssh version 2 | |
ip domain-name alex2006hw.com | |
hostname alex2006hw-switch1 | |
crypto key gen rsa gen mod 1024 |
``` | |
wget http://aspersa.googlecode.com/svn/trunk/rel | |
wget http://aspersa.googlecode.com/svn/trunk/align | |
chmod +x rel align | |
while sleep 1; do grep sdb1 /proc/diskstats; done > stats | |
``` | |
# CTRL-C after a while | |
``` | |
echo m m dev reads rd_mrg rd_sectors ms_reading \ |
####################################################### | |
### copy from Calomel.org /etc/nginx.conf BEGIN | |
####################################################### | |
# | |
worker_processes 4; # one(1) worker or equal the number of _real_ cpu cores. 4=4 core cpu | |
worker_priority 15; # renice workers to reduce priority compared to system processes for | |
# machine health. worst case nginx will get ~25% system resources at nice=15 | |
#worker_rlimit_nofile 1024; # maximum number of open files |
####################################################### | |
### copy from Calomel.org /etc/nginx.conf BEGIN | |
####################################################### | |
# | |
worker_processes 4; # one(1) worker or equal the number of _real_ cpu cores. 4=4 core cpu | |
worker_priority 15; # renice workers to reduce priority compared to system processes for | |
# machine health. worst case nginx will get ~25% system resources at nice=15 | |
#worker_rlimit_nofile 1024; # maximum number of open files |
####################################################### | |
### copy from Calomel.org /etc/nginx.conf BEGIN | |
####################################################### | |
# | |
worker_processes 4; # one(1) worker or equal the number of _real_ cpu cores. 4=4 core cpu | |
worker_priority 15; # renice workers to reduce priority compared to system processes for | |
# machine health. worst case nginx will get ~25% system resources at nice=15 | |
#worker_rlimit_nofile 1024; # maximum number of open files | |
events { |
Content-Security-Policy: default-src 'self' ajax.googleapis.com XXX.com YYY.com | |
http://caniuse.com/#feat=contentsecuritypolicy | |
http://www.w3.org/TR/CSP/ |