Category: Code
Sort by Line Length
April 14, 2009
Sort file by line length. Original Article… cat /etc/passwd | awk ‘{print length, 0}’ | sort -n | awk ‘{1=””;…
Random Password in PHP
October 20, 2008
A simple way to create a random password in PHP $password = substr(md5(time()), 0, rand(4,8));
Finding the Factorial using Recursion
September 29, 2008
Finding the Factorial using Recursion in javascript. function factorial(x) { if(x
Download Multiple URLs
September 20, 2008
Command to download a series of urls with zero padding files… for ((i=1;i
Remove www From URL using .htaccess in Apache
September 6, 2008
This htaccess code will remove the ‘www’ part from the url. It uses the mod_rewrite module of apache to re-write…
Remove a Folder from Git
July 11, 2008
Remove a given folder from a Git repository… git rm -r cache/
Remove SVN Info from a Folder
July 7, 2008
This command removes the SVN data from a folder. find -name .svn -exec rm -rf {} \;
Zero Padding In Linux Commands
July 2, 2008
This is how you zero pad a numerical variable in bash. for ((x=1;x<=31;x+=1)); do echo `printf “%02d” $x`; done Original…
Recent Comments