perl -e 'use POSIX qw(strftime ceil floor); my $ts = strftime( "%Y%m%d%H%M%S",localtime(time)); my $t = substr($ts,0,12); print "TIME: $ts $t\n"';
Tuesday, May 20, 2008
Use perl on the command line with modules
Wednesday, May 14, 2008
Use mod_rewrite to create "fake sites" (with subdomains) on a single apache vhost
Note: the subdomains need to be server aliases on the vhost
RewriteCond %{HTTP_HOST} ^(subdomain1|subdomain2)\.yoursite\.com [NC] RewriteRule ^(.*) http://www.yoursite.com/%1/%{REQUEST_URI} [L,P]Apparantly this also works:
RewriteCond %{HTTP_HOST} ^(sub1|sub2)\.yoursite\.com [NC] RewriteRule (.*) http://www.yoursite.com/%1/$1 [R=301,L]
Thursday, May 8, 2008
Monday, May 5, 2008
Change case on file extensions in a directory
for f in *.JPG; do mv $f `basename $f .JPG`.jpg; done;
Subscribe to:
Posts (Atom)