Archive for October, 2009

#!/usr/bin/env python import base64 import simplejson as json import os import sys import urllib import urllib2 global twitter_username global digu_username global digu_password twitter_username = ‘username’ digu_username = ‘username’ digu_password = ‘password’ def post_to_digu(msg): url = ‘http://api.minicloud.com.cn/statuses/update.json’ data = urllib.urlencode(msg) req = urllib2.Request(url, data) req.add_header("Authorization", "Basic %s" % base64.encodestring(‘%s:%s’ % (digu_username, digu_password))[:-1]) handle = urllib2.urlopen(req) def [...]

Friday, October 30th, 2009 at 20:04 | 2 comments
Categories: Programming, linux

very funny, and somehow accurate

Thursday, October 22nd, 2009 at 17:18 | 2 comments
Categories: blah
Tags:
TOP
Brain Bliss