Skip to content

Instantly share code, notes, and snippets.

@clowwindy
clowwindy / ssl.md
Last active April 26, 2024 03:04
为什么不应该用 SSL 翻墙

SSL 设计目标:

  1. 防内容篡改
  2. 防冒充服务器身份
  3. 加密通信内容

而翻墙的目标:

  1. 不被检测出客户端在访问什么网站
  2. 不被检测出服务器在提供翻墙服务
@clowwindy
clowwindy / 12306.user.js
Created January 8, 2012 10:46 — forked from quietlynn/12306.user.js
12306 Auto Query => A javascript snippet to help you book ticket
/*
12306 Auto Query => A javascript snippet to help you book tickets online.
Copyright (C) 2011-2012 Jingqin Lynn
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js
@clowwindy
clowwindy / gist:7889692
Last active August 19, 2021 11:46
Create 100 Linodes from Stackscript
#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib2
import json
# Linode API Key
key = 'API_KEY'
# set your VPS root password
root_pass = 'AWESOME_PASSWORD'
@clowwindy
clowwindy / Microbot.ino
Created July 25, 2015 16:13
BLE Microbot
#include <Servo.h>
#include "GoBLE.h"
#include "Metro.h"
Metro servoMove(50);
Servo myservoLF;
Servo myservoLR;
Servo myservoRF;
Servo myservoRR;
@clowwindy
clowwindy / gist:2643869
Created May 9, 2012 11:28
decode escaped unicode
var stringToParse = '\\u4f60\\u8bd5\\u8bd5';
JSON.parse('"'+ stringToParse + '"');
@clowwindy
clowwindy / 0. remote.conf
Last active November 14, 2018 03:26
SigmaVPN configure
[peername]
proto = nacltai
proto_publickey = LOCAL_PUBKEY
proto_privatekey = REMOTE_PRIKEY
local = tuntap
local_interface = tunnel
local_tunmode = 1
peer = udp
peer_localaddr = REMOTE_IP
peer_localport = 8000
clowwindy@localhost:~/workspace/test_git$ git clone /Users/clowwindy/workspace/test_git/repo/ another_user
Cloning into 'another_user'...
done.
clowwindy@localhost:~/workspace/test_git$ cd another_user/
clowwindy@localhost:~/workspace/test_git/another_user$ git fsck --lost-found
Checking object directories: 100% (256/256), done.
dangling commit 69710fb2d9e9057701d4bdacbd1df6df14f63a61
clowwindy@localhost:~/workspace/test_git/another_user$ git show 69710fb2d9e9057701d4bdacbd1df6df14f63a61
commit 69710fb2d9e9057701d4bdacbd1df6df14f63a61
Author: clowwindy <clowwindy42@gmail.com>
@clowwindy
clowwindy / Makefile
Last active January 4, 2016 03:18
stringByAddingPercentEncodingWithAllowedCharacters Crash
test: main.m
gcc -o main main.m -framework Foundation
});
});
});
});
});
@clowwindy
clowwindy / tornado_http_proxy
Created July 8, 2013 09:05
HTTP CONNECT proxy
#!/usr/bin/python
# -*- coding: utf-8 -*-
import tornado.httpserver
import tornado.ioloop
import tornado.iostream
import socket
class ProxyHandler(object):