Category: Code

SourceForge Project Packager – from SVN source

This script will package your SVN code to a tar.gz file. Just give the name of the project as the…

Heading Fonts Styles

Some fonts/styles that could be used in headings – ie. <h1> tags. font:17px “Trebuchet MS”,Verdana,Arial,Helvetica,sans-serif; font:20px Georgia,Times,serif; [tags]font,style,heading,css[/tags]

Installing Perl Modules

Install Perl modules on a linux system – must be connected to the net perl -MCPAN -e shell If CPAN…

Decompiling CHM File to HTML

hh.exe -decompile <FolderName> <Chm_File_Name> Example hh.exe -decompile “E:\Backup\” E:\All Song4s.chm [tags]windows,chm,help,decompile,html,file[/tags]

Find Difference Between 2 Dates in PHP

This function will find the difference between two given times. Does PHP already have a native function for that? //The…

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…

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…

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…