Skip to content

Instantly share code, notes, and snippets.

messense messense

Block or report user

Report or block messense

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@messense
messense / gfwlist.conf
Created Jul 9, 2017
dnsmasq.d/gfwlist.conf
View gfwlist.conf
server=/.google.com.tw/208.67.222.222#443
ipset=/.google.com.tw/gfwlist
server=/.google.com.sg/208.67.222.222#443
ipset=/.google.com.sg/gfwlist
server=/.google.co.jp/208.67.222.222#443
ipset=/.google.co.jp/gfwlist
server=/.blogspot.com/208.67.222.222#443
ipset=/.blogspot.com/gfwlist
server=/.blogspot.sg/208.67.222.222#443
ipset=/.blogspot.sg/gfwlist
View keybase.md

Keybase proof

I hereby claim:

  • I am messense on github.
  • I am messense (https://keybase.io/messense) on keybase.
  • I have a public key whose fingerprint is 1961 A032 8346 7E2B 2FA2 BD15 BB41 A8A2 C716 CCA9

To claim this, I am signing this object:

@messense
messense / npm-debug-2016-11-14.log
Created Nov 14, 2016
npm-debug-2016-11-14.log
View npm-debug-2016-11-14.log
This file has been truncated, but you can view the full file.
npm ERR! registry error parsing json
npm ERR! Linux 3.14.32-xxxx-grs-ipv6-64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--loglevel=warn"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! Unexpected token < in JSON at position 0
npm ERR! <html>
npm ERR! <head><title>400 Bad Request</title></head>
@messense
messense / sim_taobao.py
Created Oct 10, 2015
模拟登录淘宝
View sim_taobao.py
# -*- coding: utf-8 -*-
import os
import re
import json
import pickle
import logging
import logging.config
import requests
@messense
messense / rk.py
Created Oct 10, 2015
若快验证码
View rk.py
#!/usr/bin/env python
# coding:utf-8
import requests
from hashlib import md5
class RClient(object):
def __init__(self, username, password, soft_id, soft_key):
self.username = username
@messense
messense / jsonserializer.py
Created May 7, 2014
Patch django.core.signing.JSONSerializer to support mongodb ObjectId serialization.
View jsonserializer.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from bson import json_util as json
class JSONSerializer(object):
"""
Simple wrapper around json to be used in signing.dumps and
signing.loads.
"""
@messense
messense / objectdict.py
Created Apr 12, 2014
Python ObjectDict
View objectdict.py
class ObjectDict(dict):
def __getattr__(self, key):
if key in self:
return self[key]
return None
def __setattr__(self, key, value):
self[key] = value
View proxy.pac
/**
* GenPAC 0.2.1 http://jeeker.net/projects/genpac/
* Generated: Fri, 17 May 2013 14:15:55 GMT
* GFWList Last-Modified: Fri, 17 May 2013 12:41:31 GMT
*/
// proxy
var P = "PROXY 192.168.1.1:8118; DIRECT";
// user rules
@messense
messense / shadowsocks-on-openwrt.md
Last active Jul 17, 2019
shadowsocks on openwrt
View shadowsocks-on-openwrt.md

配置 shadowsocks

架设好 shadowsocks 服务端,在路由器上安装 shadowsocks 客户端,并配置 /etc/config/shadowsocks.json ,假设本地监听端口为 1080 。启动 shadowsocks

/etc/init.d/shadowsocks start

配置 privoxy

安装 privoxy openwrt 版。

@messense
messense / cmccedu.py
Last active Dec 17, 2015
CMCC-EDU WLAN login tool for weak password accounts
View cmccedu.py
#!/bin/env python
from __future__ import with_statement
import sys
import logging
import requests
import urllib
import getopt
if sys.version_info < (2, 6):
import simplejson as json
else:
You can’t perform that action at this time.