start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash | |
| # Script for installing tmux on systems where you don't have root access. | |
| # tmux will be installed in $HOME/local/bin. | |
| # It's assumed that wget and a C/C++ compiler are installed. | |
| # exit on error | |
| set -e | |
| TMUX_VERSION=1.8 |
| dict([[h.partition(':')[0], h.partition(':')[2]] for h in rawheaders.split('\n')]) |
| # -*- coding: utf-8 -*- | |
| import numpy as np | |
| import Image | |
| import sys | |
| def from_pil(pimg): | |
| pimg = pimg.convert(mode='RGB') | |
| nimg = np.asarray(pimg) | |
| nimg.flags.writeable = True | |
| return nimg |
| /* HTML PRIDE! */ | |
| html { | |
| -webkit-animation: rainbow 8s infinite; | |
| } | |
| /* | |
| Spin all images | |
| */ | |
| img { | |
| -webkit-animation: spin 1s linear infinite; |
| #include <iostream> | |
| #include <cstdio> | |
| #include <cstring> | |
| #include <cassert> | |
| using namespace std; | |
| #define REP_1(i, n) for (int i=1;i<=n;++i) | |
| #define Rush for(int ____T=RD(); ____T--;) | |
| /** I/O Accelerator Interface .. **/ //{ | |
| #define g (c=getchar()) |
| Secure sessions are easy, but not very well documented. | |
| Here's a recipe for secure sessions in Node.js when NginX is used as an SSL proxy: | |
| The desired configuration for using NginX as an SSL proxy is to offload SSL processing | |
| and to put a hardened web server in front of your Node.js application, like: | |
| [NODE.JS APP] <- HTTP -> [NginX] <- HTTPS -> [PUBLIC INTERNET] <-> [CLIENT] | |
| Edit for express 4.X and >: Express no longer uses Connect as its middleware framework, it implements its own now. |
| //http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
| Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
| //Primitive Type Comparison | |
| var a = 1; | |
| var b = 1; | |
| var c = a; | |
| console.log(a == b); //true | |
| console.log(a === b); //true | |
| console.log(a == c); //true | |
| console.log(a === c); //true |