Robocopy: MS power copy tool

Been using robocopy for a while and I thought it would be useful to list a few things it can do: Delete long directories or filenames: robocopy /purge c:\empty [to be deleted directory] Copy all drive/directories/files without changing any attributes: robocopy /copyall /mir /xj [sourcefile] [destination] Copy all drive/directories/files excluding duplicates: robocopy /copyall /mir /xj […]

Imagesloaded js: Images failed to load

A while ago I found a bug in imagesloaded js where images failed to appear after loading. This seems to be attributed by the “fixed” timer used by imagesloaded js to detect if an image has completely loaded. Consequently larger images taking longer loading time exceeded the specified fixed time. To rectify this, the timer […]

Ruby Rails: sqlite3 on Windows x64

Ruby 2.1 64-bit for Windows have problem with sqlite3 gem install where it can’t find the native library. You would get an “unable to find” or “checking for sqlite3_libversion_number() in -lsqlite3… no”. To fix this: Download source file from and unzip to a directory. Eg. C:\sqlite3 Download the 64-bit dll from here and […]

Analyzing Social Network

I find Steve Borgatti’s recent book (2013) on Analyzing Social Networks to be a good guide in introducing how you can use graph theory to describe social network. I remember reading some of his guides a few years back which caught my attention but they are all now translated into this book.

Simple File Sync between Computers

If you want to sync files between computers without any server or resorting to commit, push, etc… then Unison is a simple utility to do that.

OpenWRT: TP-Link routers wifi dropping

TP-Link routers/AP seems to have problem with the OpenWRT firmware with wifi constantly dropping. A check on system log reveals the error message “disconnected due to excessive missing ACKs”. To circumvent this problem, edit /etc/config/wireless file and append ‘option disassoc_low_ack 0’. Update: This problem is fixed in the latest OpenWRT.

Memory Allocator in Linux Kernel

There are three different memory allocator for the Linux kernel – SLAB, SLUB and SLOB. For larger system, Linux kernel uses SLAB until kernel version 2.6.23 and now the default is SLUB. SLOB on the otherhand is for small embedded system. If you’re compiling any modules and get an undefined reference to malloc_sizes error during […]

Auto-generate HTML UL/LI Table from Excel

Writing UL/LI table in HTML is always a tedious task especially when the dataset is large. So I’ve created a very simple tool long ago that can auto generate UL/LI table. This is written in Excel VBA and can place the elements horizontally or vertically. The added benefit for doing this in Excel is to […]

PHPMailer: Supporting Microsoft Exchange NTLM Authentication

A while ago while using PHPMailer, I noticed there is a lack of Microsoft Exchange support for sending e-mail on STMP using NTLM authentication. Perhaps the close endedness of the proprietary protocol makes it hard for developer support. One particular file I’m very interested in is the ntlm_sasl_client.php which is pretty outdated and only supports […]

A personal dev blog by C.J. Ng