As configured in my dotfiles.
start new:
tmux
start new with session name:
| // Sample custom iterator. | |
| // By perfectly.insane (http://www.dreamincode.net/forums/index.php?showuser=76558) | |
| // From: http://www.dreamincode.net/forums/index.php?showtopic=58468 | |
| #include <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <iterator> | |
| #include <cassert> |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| """ | |
| Two things are wrong with Django's default `SECRET_KEY` system: | |
| 1. It is not random but pseudo-random | |
| 2. It saves and displays the SECRET_KEY in `settings.py` | |
| This snippet | |
| 1. uses `SystemRandom()` instead to generate a random key | |
| 2. saves a local `secret.txt` |
| /*! | |
| * GMaps.js v0.2.26 | |
| * http://hpneo.github.com/gmaps/ | |
| * | |
| * Copyright 2012, Gustavo Leon | |
| * Released under the MIT License. | |
| */ | |
| if(window.google && window.google.maps){ |
| # Basic Strongswan ikev2 server setup | |
| * paltform: atlantic.net ubuntu 14.04 x64 | |
| * the commands below are run with root account | |
| ## Strongswan | |
| ``` | |
| apt-get install strongswan | |
| apt-get install iptables iptables-persistent | |
| ``` |
| /*global console: true */ | |
| "use strict"; | |
| /* | |
| A vector type | |
| Write a constructor Vector that represents a vector in two-dimensional | |
| space. It takes x and y parameters (numbers), which it should save to | |
| properties of the same name. | |
| Give the Vector prototype two methods, plus and minus, that take another vector as a parameter and return a new vector that has the sum | |
| or difference of the two vectors’ (the one in this and the parameter) x | |
| and y values. |
| [General] | |
| loglevel = notify | |
| skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1 | |
| bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
| # dns-server = 119.29.29.29,223.5.5.5,114.114.115.115 | |
| # external-controller-access = PASSWORD@0.0.0.0:6155 | |
| # ipv6 = true | |
| // REMEMBER TO CHANGE THE external-controller-access' PASSWORD |
| #!/bin/bash | |
| # update_gfwlist.sh | |
| # Author : VincentSit | |
| # Copyright (c) http://xuexuefeng.com | |
| # | |
| # Example usage | |
| # | |
| # ./whatever-you-name-this.sh | |
| # | |
| # Task Scheduling (Optional) |