Skip to content

Instantly share code, notes, and snippets.

View netputer's full-sized avatar

NetPuter netputer

View GitHub Profile
@netputer
netputer / package.json
Created December 1, 2019 09:24
Express HTTP Context Demo
{
"name": "express-context",
"version": "1.0.0",
"description": "",
"main": "server.js",
"dependencies": {
"express": "^4.17.1",
"express-http-context": "^1.2.3",
"request": "^2.88.0"
},
{"sig":"238347f124da0408a06ed383a0e76d718139206383ff4cc2ac51451742a3bc75b446246613b0ad1ef5423c15c2309b26bef2791f4afbb6193f812ee10619d6440","msghash":"6bcc4ad87760e936b835ee4e67180dbeef6db1cdf159c46d7c1f5b5a58417b0e"}
@netputer
netputer / Surge.conf
Created November 28, 2015 17:00
My Surge config
// Refs:
// ~ https://gist.github.com/soffchen/47a44825626b1cbd0948
// ~ https://gist.github.com/janlay/b57476c72a93b7e622a6
// ~ https://gist.github.com/jason5ng32/648597df6ca7da5aeb41
[General]
loglevel = notify
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, e.crashlytics.com
bypass-tun = 0.0.0.0/8, 1.0.0.0/9, 1.160.0.0/11, 1.192.0.0/11, 10.0.0.0/8, 14.0.0.0/11, 14.96.0.0/11, 14.128.0.0/11, 14.192.0.0/11, 27.0.0.0/10, 27.96.0.0/11, 27.128.0.0/9, 36.0.0.0/10, 36.96.0.0/11, 36.128.0.0/9, 39.0.0.0/11, 39.64.0.0/10, 39.128.0.0/10, 42.0.0.0/8, 43.224.0.0/11, 45.64.0.0/10, 47.64.0.0/10, 49.0.0.0/9, 49.128.0.0/11, 49.192.0.0/10, 54.192.0.0/11, 58.0.0.0/9, 58.128.0.0/11, 58.192.0.0/10, 59.32.0.0/11, 59.64.0.0/10, 59.128.0.0/9, 60.0.0.0/10, 60.160.0.0/11, 60.192.0.0/10, 61.0.0.0/10, 61.64.0.0/11, 61.128.0.0/10, 61.224.0.0/11, 100.64.0.0/10, 101.0.0.0/9, 101.128.0.0/11, 101.192.0.0/10, 103.0.0.0/10, 103.192.0.0/10, 106.0.0.0/9, 106.224.0.0/11, 110.0.0.0/7, 112.0.0.0/9, 112
@netputer
netputer / gist:3904638
Created October 17, 2012 09:19
通过 jQuery 选择器创建 HTML 元素
$('<select/>', {
html: $('<option/>', {
html: 'All'
})
});
// <select>​<option>​All​</option>​</select>​
@netputer
netputer / change-subscribe-reminder.php
Created July 15, 2012 10:52
通过 PHP 实现定期提醒更换订阅的 RSS Feed
<?php
require_once('./wp-load.php');
// 加载 WordPress 库,用于获取博客标题等信息
define('DONOTCACHEPAGE', TRUE);
// 禁止 WP Super Cache 对该页面进行缓存
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
// 设置页面类型