Archive for November, 2009

Python File System Operation Snippets Collection

In this post, I’ll share some simple snippet to do various file system operation. Pretty much as a bookmark for my own usage, in case I needed it someday.
How to get current working directory:

import os
os.getcwd()

How to change working directory:

import os
os.chdir(‘/tmp/’)

How to list directory contents:

import os
os.listdir(‘/tmp/’)

How to check if directory / file exists:

import os
os.path.exists(‘/tmp/’)#work for both [...]

Employee Wasting Company Time? Spy on Them

An employee looks very serious in front of the computer. His hands move very fast in his keyboards. It’s like he’s working very hard. But after that, suddenly he is smiling and even laughing something even tough nothing is funny around him. What does he do exactly?

Automate Facebook Status Update Without Facebook API

Sweet little snippet with only 10 lines of code! Using python mechanize library to update your facebook status. Check out the code:

Whoa, Listed In Wikipedia Page!

WARNING: HIGHLY NARCISS POST AHEAD!

Multiple Boot Partition Tips

Yesterday, I had a chance to install ubuntu 9.10 ‘karmic koala’ on my laptop. Having read several online reviews made me rethink my strategy. Previously, whenever there’s new ubuntu release, I will always do fresh install. Now, several minor but annoying bug appeared in reviews where I had similar hardware . Kind of annoying, but, [...]

Using Dropbox For Easy File Sharing

I share docs with my colleague every now and then. Previously, I would have sent it as email attachment or upload it somewhere. But, from the moment I use dropbox, sharing documents has never been this easy!

Save Your Future with Gold

In this such an uncertain world, we need a form of investment that can protect our assets. Gold is one of the choice we can make. It is the ultimate asset. It is the oldest form of money and the purest. With gold we can preserve our asset of wealth because gold is the most [...]

Math isn’t Frightening Anymore

Almost all of the student think that math is a difficult subject. When they have to choose, they rather not choose math as one of the subject they have to study. But unfortunately, math is the important subject, that every student must master.

Wrapping get_post_meta() with default value

As wordpress developer, we will almost always use get_post_meta(). There’s a catch in using it though, as there will be situation where we want to get a meta value on a non initialized meta. Something thing we expected to be present but not created yet.

Introducing The New XP Phone!

– VIA gizmodo