Octopress Table Stylesheet
Octopress has been very cool for the 2 weeks since I began using.
My first hiccup came when I tried using table in this post. Firstly, I have to figure out how to create table in Octopress. Yet after figuring out, the table doesn’t get displayed! It’s just not working.
Continue reading →I Bought samwize.com for 99 Cents
This blog is now given an official (domain) name since I switched to Octopress 2 weeks ago.
The domain is bought from NameCheap at 99 cents for first year, thereafter $10.69/yr. This is a special promo given after they won the best registrar from lifehackers. (promo code WELOVEU)
Wonder how I host this blog?
Continue reading →How to Write Getter/Setter for Static Variables
In the last post, I blogged about how you should write Getter/Setter for member variables.
This is a follow-up for static variables, instead of instance variables.
Continue reading →How You Should Write Getter/setter for Python
Coming from the Java world, I am used to writing getter/setter for every member variables that I want to expose. (truth is I made use of IDE to auto generate)
I hate how much code Java has.
With it’s philosophy of readable code, Python is different.
Continue reading →Non-ASCII Character in Python File
If you have non-ASCII characters eg. chinese in your python source code, you would encounter the following error:
Python Error: Non-ASCII character in file but no encoding declared
Python by default does not allow Non-ASCII characters in the file. You have to insert the following at the top of the Python file.
#!/usr/bin/env python
# -*- coding: utf8 -*-
This works on a per file basis.
Paros - a Mitmproxy With GUI for Sniffing HTTP Traffic
I introduced mitmproxy for sniffing iPhone HTTP traffic back at just2us.com.
mitmproxy is awesome, except that it isn’t very user friendly, as it is a text console interface. Many times, I have to figure what are the keys to move around or access certain function.
That’s where Paros shines.
This is how you setup up Paros to sniff iPhone HTTP Traffic:
Continue reading →Adding and Using Custom Font in iOS
Custom font can be easily added and used in iOS 3.2 or above. Yet it is a very popular question on for iOS Developers.
Here are the steps:
Continue reading →Sphinx – Documentation for Python
Python is a wonderful language also because of the awesome tools that are available.
One of which is Sphinx. It is like markdown, but even more, with cross referencing of pages and autogeneration of doc for python code.
Start with installing Sphinx.
$ sudo easy_install -U Sphinx
Continue reading →
Hide “All My Files” in Mac’s Finder
It took me a few months before I decide “All My Files” is a useless feature for Mac OS Lion.
I was irked that it is the default view when you create new Finder window. And I was even more irked that the default arrangement by Kind shows my Adium chat log right at the top..
Continue reading →