Skip to content

Instantly share code, notes, and snippets.

@weirhp
weirhp / gplus.stream.api.js
Created January 11, 2012 02:50 — forked from quietlynn/gplus.stream.api.js
An unofficial API to get Google+ streams.
/*
Google+ Stream API => An unofficial API to get Google+ streams.
Copyright (C) 2012 Jingqin Lynn
Based on the "An Unofficial Google+ Circle and Followers API for Google Chrome" poject
https://github.com/mohamedmansour/google-plus-extension-jsapi
by +Mohamed Mansour <https://github.com/mohamedmansour>
Under the license: https://github.com/mohamedmansour/google-plus-extension-jsapi/blob/master/LICENSE.md
This program is free software: you can redistribute it and/or modify
@weirhp
weirhp / gist:1749500
Created February 6, 2012 04:06 — forked from wendal/gist:1749430
演示简单Proxy代理类
public static void main(String[] args) {
List list = (List) Proxy.newProxyInstance(List.class.getClassLoader(),
new Class[] { List.class },
new InvocationHandler() {
public Object invoke(Object obj, Method method, Object[] args)
throws Throwable {
if ("size".equals(method.getName()))
return (int)(Math.random() * 1000);
return null;
@weirhp
weirhp / MethodParamNamesScaner.java
Created March 10, 2012 15:45 — forked from wendal/MethodParamNamesScaner.java
获得方法形参名称列表(Java)
package com.weirhp;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
@weirhp
weirhp / pypod.py
Created May 18, 2012 07:23 — forked from chuangbo/README.md
Python dynamic DNSPod DNS Script
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import httplib, urllib
import socket
import time
params = dict(
login_email="email", # replace with your email
login_password="password", # replace with your password
@weirhp
weirhp / gist:2971187
Created June 22, 2012 07:57 — forked from wendal/gist:2364746
nutz 为所有实体类建好全部表
Dao dao = ioc.get(Dao.class);
for (Class<?> klass : Scans.me().scanPackage("net.wendal.tb.bean"))
if (klass.getAnnotation(Table.class) != null)
dao.create(klass, false);
@weirhp
weirhp / unwxapkg.py
Created January 3, 2018 06:19 — forked from thedreamwork/unwxapkg.py
unpack wxapkg
#!/usr/bin/python
# usage python unwxapkg.py filename
import sys,os
import struct
class WxapkgFile:
nameLen = 0
name = ""