Category Archives: Programming

SimpleDB: python MySQLdb wrapper with auto connect

A python MySQLdb wrapper with auto connect function. Continue reading

Posted in Programming, Python | Tagged | Leave a comment

A python exception retry decorator

A retry decorator with exponential backoff. retries a function or method if Exception occurred Continue reading

Posted in Programming, Python | Tagged , , , | Leave a comment

some fabric trap and tricks

Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. Here’s some trap and tricks I met and got from my usual use. trap 1: operation error  cause … Continue reading

Posted in Programming, Python, System Administration | Tagged , | Leave a comment

how to build v8 static library

how to build v8 static library Continue reading

Posted in Programming | Tagged , , | 1 Comment

out-of-date document hurts

the headache of building V8 JavaScript Engine Continue reading

Posted in Programming | Tagged , | 3 Comments

who attach shared memory

Find out which processes attached to which shared memory segment Continue reading

Posted in Perl, System Administration | Tagged , , , | Leave a comment

Change shared memory ownership and permission

We know that we can use ipcs to view shared memory segment information,we can use ipcrm to delete a segment. But wait. Assume that you first run a program as root user,  which creates a shared memory segment of 40GB … Continue reading

Posted in Programming, System Administration | Tagged , | Leave a comment

Trace command call chain on Linux

A tool to trace command call history with chained output Continue reading

Posted in Perl, System Administration | Tagged , | Leave a comment

A journey to troubleshooting by sersync exclude bug

For the last half year, one of our file distributing syststem goes out of sync occasionally, which bothered me a lot. The simplified system workflow looks like this:

Posted in Programming, System Administration | Tagged , , , , | Leave a comment

extract databases or tables from mysqldump

I wrote a simple fast and flexible perl script called xmysqldump.pl to extract databases/tables from mysqldump sql file, you may download it from here. Usage: ./xmysqldump.pl -h|–help This page ./xmysqldump.pl -l|–list [file.sql …] List databases and tables ./xmysqldump.pl -a|–all-tables [file.sql … Continue reading

Posted in Perl, Programming, System Administration | Tagged , , , | 5 Comments