This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# lrdcq | |
# usage python2 unwxapkg.py filename | |
import sys, os | |
import struct | |
class WxapkgFile(object): | |
nameLen = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# usage python unwxapkg.py filename | |
import sys,os | |
import struct | |
class WxapkgFile: | |
nameLen = 0 | |
name = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var CryptoJS = require('crypto-js') | |
var request = require('request-promise') | |
/* | |
* npm install crypto-js request-promise | |
* node wx_t1t_hack.js | |
*/ | |
// export function testEncription(msg, fullKey) { | |
// var fullKey = fullKey.slice(0, 16) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import html | |
import urllib | |
import sys | |
import http | |
import cgi | |
import socket | |
import socketserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
tcp dns client for google dns over https (https://dns.google.com) | |
ubuntu上使用: | |
在/etc/rc.local里加/usr/bin/php /home/<your_name>/dns2https.php | |
执行: | |
sysv-rc-conf unbound off | |
sysv-rc-conf dnscrypt-proxy off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# vim: set fileencoding=utf8 | |
import os | |
import sys | |
import requests | |
import urllib | |
import json | |
import re | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# サイト全体のはてブ数を取得する | |
# get the sum total of hatena bookmark count for a site | |
# | |
# usage: | |
# hatena_get_count_for_site http://example.com | |
# | |
function hatena_get_count_for_site { | |
# @see http://developer.hatena.ne.jp/ja/documents/bookmark/apis/getcount | |
if [ "$#" -ne 1 ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.7 | |
# coding: utf-8 | |
"""Mac に備え付けの辞書アプリをコマンドラインで利用する | |
Usage: | |
/usr/bin/python2.7 __file__ < [検索したい単語を格納したファイル.txt] | |
See: | |
- Accessing Dictionaries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# update_gfwlist.sh | |
# Author : VincentSit | |
# Copyright (c) http://xuexuefeng.com | |
# | |
# Example usage | |
# | |
# ./whatever-you-name-this.sh | |
# | |
# Task Scheduling (Optional) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os.path | |
import requests | |
from lxml import etree | |
file_path = 'https://developer.apple.com/videos/wwdc/2014/' | |
sd_path = os.path.expanduser("~/Desktop/wwdc2014_sd.txt") | |
hd_path = os.path.expanduser("~/Desktop/wwdc2014_hd.txt") | |
pdf_path = os.path.expanduser("~/Desktop/wwdc2014_pdf.txt") | |