Code Snippets

Code snippets from my researches and various scripts that I use for my work. Codes samples and programs in this section are available for public use under GNU GPL v3 or later as described in here.

Command line Broadband Usage Meter (SLT)

සටහන: 2014-01-02 දින සිට SLT වෙබ්‍ අඩවියේ කරනලද වෙනස්කම් හේතුවෙන් මෙම කේතය භාවිතයෙන් තවදුරටත් ප්‍රතිපල ලබාගත නොහැක.

_දැන් SLT භාවිත කරන හැම දෙනාගේම දත්ත භාවිතා කරන ප්‍රමාණය සීමා කරල නිසා පරිස්සමෙන් පාවිච්චි කරන්න වෙලා. දැනට කොච්චර පාවිච්චි කරලද කියල බලන්න නිතර Usage Meter එකට ලොග්වෙන්න තියන කම්මැලි කමට මේක හදා ගත්ත./_

ESPN cricket score OSD

I like to keep up with the cricket match scores when Sri Lanka is playing, but don't want to sit in-front of a TV or don't have the time for it. I use ESPN Cricinfo to check the score, but it is tedious to go to the site and click around to locate the match each time I need to know the score.

BIOS reset

Long time ago there was a time I was fascinated by getting access to password protected BIOS configurations (CMOS confguration as it was called back then). I read lot of books about resetting the BIOS/CMOS and found this method to restore the BIOS configuration to it's factory default.

Bitmap display in VGA mode

A program I wrote back in 1998 to read a bitmap image (uncompressed) file and display it in the VGA mode screen (DOS mode).

Bouncing Ball?

I don't even remember what this does, I couldn't find a compiler or a capable system try this on. I think it suppose to bounce a ball around the VGA graphics screen.

Log file OSD

When working on something in GUI mode it's not easy to keep track of the logs. I wrote the following bash script to tail a log file and send each line to libnotify so I get OSD log events.

On-screen clock for DOS

A clock that runs in the background in a DOS system and display the system time while it's operational.