Skip to content

Instantly share code, notes, and snippets.

/**
* 获取12306余票信息
*
* 查询列车的余票信息
* GET https://dynamic.12306.cn/otsweb/order/confirmPassengerAction.do?method=getQueueCount&train_date=2013-02-05&train_no=240000D31307&station=D313&from=VNP&to=SHH
*
* URL参数解析
* train_date // 不用说了吧
* train_no // 列车ID, 在余票查询结果车次的span中可以得到
* station // 车次
@flyingnn
flyingnn / gist:4174171
Created November 30, 2012 06:45 — forked from ego008/gist:897638
GAE Nginx proxy
upstream ghs {
ip_hash;
server ghs.google.com;
server 72.14.203.121;
server 72.14.207.121;
server 74.125.43.121;
server 74.125.47.121;
server 74.125.53.121;
server 74.125.77.121;
server 74.125.93.121;
@flyingnn
flyingnn / gist:4174169
Created November 30, 2012 06:44 — forked from ego008/gist:897633
GAE-Nginx
server {
listen 80;
server_name www.xibu.biz;
location / {
proxy_redirect off;
proxy_pass http://gae-bbs.appspot.com;
proxy_set_header Host "gae-bbs.appspot.com";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@flyingnn
flyingnn / encrypted-git-repo.md
Created September 8, 2012 16:03
Transparent Git Encryption

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang (geek@cerias.net). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

@flyingnn
flyingnn / README.md
Created January 11, 2012 13:26 — forked from mashihua/README.md
Query tickets in china

Run it your own risk.

Query tickets in china

How to

  1. Copy ticket.js and run it on your browser
  2. Install node.js
  3. Put package.json and server.js into a folder
  4. Copy a mp3 to the same forder and rename it to "alert.mp3"
@flyingnn
flyingnn / 12306AutoSubmit.user.js
Created January 9, 2012 15:42
12306 Auto Submit
/*
12306 Auto Submit => A javascript snippet to help you auto submit.
Copyright (C) 2011 Kevintop
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes 12306.user.js
/*
12306 Auto Login => A javascript snippet to help you auto login 12306.com.
Copyright (C) 2011 Kevintop
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes 12306.user.js
/*
12306 Auto Login => A javascript snippet to help you auto login 12306.com.
Copyright (C) 2011 Kevintop
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes 12306.user.js
@flyingnn
flyingnn / 12306.user.js
Created January 7, 2012 09:22 — 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 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
@flyingnn
flyingnn / 12306.user.js
Created January 7, 2012 09:22 — 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 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