Skip to content

Instantly share code, notes, and snippets.

[General]
# warning, notify, info, verbose
external-controller-access = apw@0.0.0.0:6155
interface = 0.0.0.0
port = 8888
socks-port = 8889
ipv6 = 0
bypass-system = 1
dns-server = system, 223.5.5.5, 114.114.114.114, 119.29.29.29
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
@ultimate010
ultimate010 / dawg.py
Created October 13, 2015 05:17 — forked from smhanov/dawg.py
Use a DAWG as a map
#!/usr/bin/python3
# By Steve Hanov, 2011. Released to the public domain.
# Updated 2014 to use DAWG as a mapping.
import sys
import time
DICTIONARY = "/usr/share/dict/words"
QUERY = sys.argv[1:]
# This class represents a node in the directed acyclic word graph (DAWG). It
# 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
```
@ultimate010
ultimate010 / vpnsetup.sh
Last active August 29, 2015 14:26 — forked from hwdsl2/.MOVED.md
IPsec L2TP VPN Auto Install Script for Ubuntu 14.04 & 12.04 and Debian 8 & 7
#!/bin/sh
#
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN server
# on a Ubuntu or Debian instance. Tested with Ubuntu 14.04 & 12.04 and Debian 8 & 7.
# With minor modifications, this script *can also be used* on dedicated servers
# or any KVM- or XEN-based Virtual Private Server (VPS) from other providers.
#
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN
# YOUR AMAZON EC2 INSTANCE STARTS!
#
@ultimate010
ultimate010 / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# valid
aws cloudformation validate-template --template-body file://MyStack.json
# create stack
aws cloudformation create-stack --template-body file://Mystack.json --stack-name MyFirstStack
# create stack with parameter
aws cloudformation create-stack --template-body file://CloufFormationSample.json --stack-name MyFirstStack --parameters ParameterKey=KeyNameParameter,ParameterValue=HogeKeyPair
# update stack
var cv = document.getElementById('cv');
var c = cv.getContext('2d');
var txtDiv = document.getElementById('txt');
var fileBtn = document.getElementById("up-button");
var img = new Image();
img.src = 'a.jpg';
img.onload = init; // 图片加载完开始转换
fileBtn.onchange = getImg;
// 根据灰度生成相应字符