Author: Binny V A

A philosopher programmer who specializes in backend development and stoicism.

Find the Fourth Sunday

Javascript code for finding the fourth sunday in any given month. function findFourthSunday(year,month) { var fourth_sunday = 0; var sunday_count…

Packaging a Subversion Project

This is the method that I use to package a SVN Project. For CVS projects, the code is slightly different….

Using Subversion – Import, Checkout and Update

Import/New Project svn import <Folder> <Repository> Online Repository Example svn import Nexty https://nexty.svn.sourceforge.net/svnroot/nexty Checkout svn checkout https://nexty.svn.sourceforge.net/svnroot/nexty [<folder>] Update svn…

Recording Sound in Linux

To record a sound in wav format from Mic, just use this command… arecord -f cd test.wav Use Ctrl+C to…

Text to Speech – Hear a File

Festival is a speech synthesizer for Linux. You can use this with the following commands… Enter a festival console for…

MySQL Database Backup/Restore

This command can be used to backup MySQL database. mysqldump -u <User> -p <Database name> [<Table name>] > backup.sql This…

Shortest way to create an XMLHttpRequest object

For best results use a framework – like jx http = window.XMLHttpRequest ? new window.XMLHttpRequest : (window.ActiveXObject ? new ActiveXObject(“MSXML2.XMLHTTP”):…

Command to Replace a String in all Files in Current Directory

Replaces all instance of ‘<old string>’ with ‘<new sting>’ in all the files of the current directory. perl -pi -e…

List All Files in a Folder Recursively

Save the list of all files in a folder – recursively. find .|sed ‘s/\.\///;’ Another option is ls -R -1…

Download Entire Folder using Wget Command in Linux

wget -m http://www.tldp.org/HOWTO/Serial-Programming-HOWTO/ -m, –mirror shortcut for -N -r -l inf –no-remove-listing. wget -H -r –level=1 -k -p http://www.tldp.org/HOWTO/Serial-Programming-HOWTO/ -r,…