Unix

Crossplatform QueryPerformanceTimer

Posted by on September 26, 2010 at 10:25 am

Here is a simple way to get high precision timer on both Linux and Windows (can’t remember where I saw parts of this code, but I hope wrapping it up and spreading it won’t make the author angry) : cross_platform_timer.h cross_platform_timer.cpp I added few helper wrappers to make the life easier, you can get current [...]

Resurrect NTFS partition after Win XP reinstall

Posted by on June 9, 2010 at 9:19 pm

The system was missing my partition E, or my Storage partition. It was wiped out. Storage manager denoted it as unallocated space. A quick reboot into Ubuntu ended up with same knowledge: Unallocated space.

No space for panic. Google comes, google helps. I found a marvelous little command line tool which was able to revamp my Storage NTFS partition in about 10 seconds. It’s called testdisk.

Grep intelligence – grep lines that DO NOT MATCH an expression

Posted by on May 13, 2010 at 11:24 am

I have an apache access log that I need to monitor frequently while users do funny things, but the problem is 99% of the logged calls are some trivial ajax get requests which do stuff, like ‘check new messages’ which, when coming in from each user who has opened the page each second, tend to [...]