Author Archives: Curu Wong

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

Nginx userdir with php

implement userdir with php in nginx Continue reading

Posted in Web | Tagged , , | Leave a comment

nginx – try files on multiple named location or server

Let’s start from the simplest case: How to serve files locally first, and proxy the request to other backend/internal server if not found? listen 192.168.1.10:80; … location /static/ { try_files $uri @static_svr1; } location @static_svr1{ proxy_pass http://192.168.1.11$uri; } That’s simple! … Continue reading

Posted in System Administration, Web | Tagged , , , , | 2 Comments

LinuxMint – Why package manager failed to start

I haven’t used my Linux Mint maya for about half year.  Today I logged in,  did a system update with the following command: sudo apt-get update sudo apt-get dist-upgrade sudo reboot Then when I logged in again and tried to … Continue reading

Posted in Linux Desktop | Tagged , , , , , | 2 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