Author: Binny V A

A philosopher programmer who specializes in backend development and stoicism.

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,…

Change the Extension of Multiple Files in Linux

In this example, we will change all files with extension ‘.info’ to ‘.txt’. Rename all *.info files in one folder…

Using PHP’s Curl functions behind a Proxy

Using PHP’s Curl functions even if the net is accessible only thru a proxy. This is the only way curl…

Changing separator with Perl

This will join all lines of a file together. Sometimes I have a list of something in a file, one…

Object or Array

Find whether the given variable is an object,or is an Array? function isArray(testObject) { return testObject && !(testObject.propertyIsEnumerable(‘length’)) && typeof…

CVS Through Proxy

Command to import a CVS project’s code through a proxy Checkout code from remote server(No Proxy) cvs -z3 -d:ext:binnyva@nexty.cvs.sourceforge.net:/cvsroot/nexty co…