Skip to content

Instantly share code, notes, and snippets.

/*
* Commandline interface for proxy settings.
* This requires revision >= 4430 for subCommands.
*
* examples:
* - display current proxy type
* :proxy
* - do not use proxy
* :proxy direct
* - manual proxy configuration
@scola
scola / 00-README.txt
Last active August 29, 2015 14:15 — forked from klzgrad/00-README.txt
$ LD_PRELOAD=$PWD/sendmsg.so dig twitter.com @8.8.8.8
;; Warning: Message parser reports malformed message packet. <-- malformed 因为把压缩指针当作域名一部分了
;; Question section mismatch: got twitter.com/RESERVED0/CLASS256
; <<>> DiG 9.9.5-3-Ubuntu <<>> twitter.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44722
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
@scola
scola / mytweets.py
Last active August 29, 2015 14:09 — forked from tsileo/mytweets.py
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import requests
from requests_oauthlib import OAuth1
from urlparse import parse_qs
REQUEST_TOKEN_URL = "https://api.twitter.com/oauth/request_token"
AUTHORIZE_URL = "https://api.twitter.com/oauth/authorize?oauth_token="
ACCESS_TOKEN_URL = "https://api.twitter.com/oauth/access_token"