(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| location /aaa/ { | |
| # internal; | |
| set $upstream ""; | |
| set $referer ""; | |
| set $ref $arg_ref; | |
| set $url $arg_url; | |
| set $tohost ""; | |
| set $newuri ""; | |
| # add_header Content-Type text/plain; |
| server { | |
| root /var/www/example.com/static; | |
| server_name example.com; | |
| access_log /var/log/nginx/example.com.access.log; | |
| error_log /var/log/nginx/example.com.error.log; | |
| try_files /maintenance.html @proxy; | |
| location @proxy { | |
| proxy_pass http://127.0.0.1:10001; |
| Munin Passenger Plug-in Installation | |
| Configure the passenger plug-ins according the the guide on http://www.alfajango.com/blog/how-to-monitor-your-railspassenger-app-with-munin/ | |
| NOTE: restart munin after implementing the following changes for Single-User RVM | |
| sudo nano /etc/munin/plugin-conf.d/munin-node | |
| [passenger_*] | |
| user root |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <assert.h> | |
| #include "zlib.h" | |
| //#define CHUNK 16384 | |
| #define CHUNK 1024 | |
| #define INFLAT_RATE 16 | |
| #define DEFLAT_RATE 1.2 |
| # DATA FRAME OPERATIONS IN R | |
| # Create data frame | |
| # A dataset is ~ table (list of vectors) | |
| id <- c(1,2,3) | |
| name <- c("John", "Kirk", "AJ") | |
| age <- c(21,27,18) | |
| employees <- data.frame(ID=id, Name=name, Age=age) | |
| employees |
| """ | |
| Simple Linear Probabilistic Counters | |
| Credit for idea goes to: | |
| http://highscalability.com/blog/2012/4/5/big-data-counting-how-to-count-a-billion-distinct-objects-us.html | |
| http://highlyscalable.wordpress.com/2012/05/01/probabilistic-structures-web-analytics-data-mining/ | |
| Installation: | |
| pip install smhasher | |
| pip install bitarray |
Read the blog at http://fokkezb.nl/2013/09/20/url-schemes-for-ios-and-android-2/
| #!/usr/bin/env ruby | |
| # List all keys stored in memcache. | |
| # Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
| require 'net/telnet' | |
| headings = %w(id expires bytes cache_key value) | |
| rows = [] |
| #!/bin/bash | |
| # Copyright bitly, Aug 2011 | |
| # written by Jehiah Czebotar | |
| DATAFILE="/var/tmp/nagios_check_forkrate.dat" | |
| VALID_INTERVAL=600 | |
| OK=0 | |
| WARNING=1 | |
| CRITICAL=2 |