Skip to content

Instantly share code, notes, and snippets.

# You can download this config from: http://surge.run/config-example/ios.conf
# Edit with your computer and copy back to iOS device via iTunes, URL, AirDrop
# or iCloud Drive
# Version 2.0
[General]
# Log level: warning, notify, info, verbose (Default: notify)
loglevel = notify
# Skip domain or IP range. These hosts will not be processed by Surge Proxy.
# (In macOS version when Set as System Proxy enabled, these hosts will be
# 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf
# 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备
# Version 2.0
[General]
# 日志等级: warning, notify, info, verbose (默认值: notify)
loglevel = notify
# 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS
# 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理
# 设置中.)
@shajiquan
shajiquan / ngx_elixir_hex.conf
Last active February 24, 2016 08:38
Nginx reverse config for hex.pm( A package manager for the Erlang/Elixir ecosystem )
upstream hexpm {
server s3.amazonaws.com:443;
}
server {
listen 80;
server_name your-domain.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
@shajiquan
shajiquan / get_list_from_post_in_tornado.py
Last active November 16, 2015 04:42
Get list form post in Tornado
class FormHandler(tornado.web.RequestHandler):
def get(self, *args, **kwargs):
return self.render("forms.html")
def post(self, *args, **kwargs):
orders = self.get_body_arguments("order", None)
print("orders", orders)
print("type(orders)", type(orders))
#!/bin/env python
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
import tornado.httpclient
import tornado.gen
from tornado.concurrent import run_on_executor
from concurrent.futures import ThreadPoolExecutor