#!/usr/bin/env python
import string
import random
out_file = 'text_file.txt'
file_size = 1024 * 1024
rands = lambda x: ''.join(random.choice(string.letters + string.digits) for x in xrange(x))
with open(out_file, 'w') as f:
f.write(rands(file_size))
To enable Django OpenID authentication, I choose django-openid-auth. But when I deploy to dotcloud, there’s a ‘404’ as welcome message :p Read More
I’ve trying to use MySQL Connector C++ for my project, here the example code (retrieved from official site): Read More
Growl notifier has been updated to 1.3.x last year, and it also became a paid software. Since it’s open-sourced, so I decided to build it myself. The steps are quite simple, just follow the documentation you will be fine. Just be sure you have mercurial (hg) command line tools. Read More
My AWS EC2 free tier is expired, so I switched to a fully-dotcloud-hosted site (originally I’ve host MySQL on dotcloud). Here are some notes we need to take care. Read More
Using ftp to upgrade wordpress plugins is not a safe way: you will need to open the ftp port and have a ftpd daemon just for upgrading wordpress. Read More
To run MySQL on dotcloud is very easy, just follow the documentation: Read More
QuickNote: follow the Official guide may not be enough. Read More