Skip to content

Instantly share code, notes, and snippets.

@xbdotl
xbdotl / block-weibo-red-guards.js
Created October 11, 2017 06:52
拉黑微博监督员,书签脚本
javascript:
!function() {
let WEIBO_RED_GUARDS_LIST = 'https://raw.githubusercontent.com/yu961549745/WeiboBlackList/master/list.txt'
, BLOCK_URI = '//weibo.com/aj/filter/block?ajwvr=6'
, BLUEBIRD_URI = '//cdn.staticfile.org/bluebird/3.5.0/bluebird.min.js'
, UID_REGEXP = new RegExp(/^\d+$/)
, MAX_CONCURRENCY = 1
, PER_REQ_DELAY_MS = 2000
, RESULT_SET = []
;
package util
import (
"fmt"
"math/big"
"crypto/dsa"
"encoding/asn1"
"encoding/pem"
"crypto/rand"
"encoding/base64"
@xbdotl
xbdotl / eyeprotector.js
Last active May 1, 2017 12:55
Eye protector for reading
javascript: !function() {
var nameArr = [
'details',
'post',
'postBody',
'article',
'body',
'html',
'section',
@xbdotl
xbdotl / china-ip-list-pac-gen.js
Last active March 14, 2017 11:19
pac generator for china ip list
javascript: !function() {
var CIDR_IP_LIST_URL = 'https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt';
var PROXY_URL = 'Change this to your proxy address.';
var PAC_TMPL = [
'\'use strict\';',
'',
'// template literals',
`var autoproxy = '${PROXY_URL}';`,
@xbdotl
xbdotl / golang-tls.md
Created January 31, 2017 15:48 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key