start new:
tmux
start new with session name:
tmux new -s myname
| package main | |
| import ( | |
| "flag" | |
| "log" | |
| "sync" | |
| "github.com/apple/foundationdb/bindings/go/src/fdb" | |
| ) |
| package main | |
| import ( | |
| "log" | |
| "sync" | |
| "github.com/sideshow/apns2" | |
| "github.com/sideshow/apns2/certificate" | |
| ) |
| package main | |
| import ( | |
| "log" | |
| "sync" | |
| apns "github.com/sideshow/apns2" | |
| "github.com/sideshow/apns2/certificate" | |
| ) |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
| cd ~/ | |
| wget http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.gz | |
| tar -xzf ruby-1.9.3-p484.tar.gz | |
| cd ruby-1.9.3-p484 | |
| ./configure | |
| make | |
| sudo make install | |
| sudo service nginx restart |
| :#!/bin/bash | |
| # Script Created by Christopher Silvertooth. Inspiration from Clay Caviness. | |
| # http://musings.silvertooth.us | |
| # Version 2.0 Mountain Lion compatibility | |
| # 2.0.1 added verify disk check | |
| # 2.0.2 added Retina Macbook Pro and 2012 Air check | |
| # 2.0.3 Fixed bug in OS detection. Reported by Steve Silvertooth. | |
| # 2.0.4 Fixed diskutil check so that it doesn't break with multiple drives. | |
| # 2.0.5 Bug fixes. Wrong recovery partition added. |
| cd ~ | |
| sudo apt-get update | |
| sudo apt-get install openjdk-7-jre-headless -y | |
| wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.4.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| sudo mv elasticsearch-* elasticsearch | |
| sudo mv elasticsearch /usr/local/share |
| check process redis-server | |
| with pidfile "/var/run/redis.pid" | |
| start program = "/etc/init.d/redis-server start" | |
| stop program = "/etc/init.d/redis-server stop" | |
| if 2 restarts within 3 cycles then timeout | |
| if totalmem > 500 Mb then alert | |
| if children > 255 for 5 cycles then stop | |
| if cpu usage > 95% for 3 cycles then restart | |
| if failed host 127.0.0.1 port 6379 then restart | |
| if 5 restarts within 5 cycles then timeout |
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: redis-server | |
| # Required-Start: $syslog $remote_fs | |
| # Required-Stop: $syslog $remote_fs | |
| # Should-Start: $local_fs | |
| # Should-Stop: $local_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: redis-server - Persistent key-value db |