Home » Archive

Code »

[8 Jul 2008 | No Comment | ]

Removing or changing “Powered by X-Cart” logo
To do so, you should modify skin1/main/prnotice.tpl.

Code »

[8 Jul 2008 | One Comment | ]

All search crawlers recognize robots.txt, so it seemed like a good idea to use that mechanism to allow webmasters to share their Sitemaps. You agreed and encouraged us to allow robots.txt discovery of Sitemaps on our suggestion board. We took the idea to Google and Microsoft and are happy to announce today that you can now find your sitemaps in a uniform way across all participating engines. To do this, simply add the following line to your robots.txt file:
Sitemap: http://www.example.tld/sitemap.xml

Code, Headline »

[6 Jul 2008 | 10 Comments | ]
Amazon s3 backup for web server files and SQL using bash

I needed a solid backup method for my clients websites, where I wanted to improve from the previous method of backing up to a separate host in the US Hostmonster. Hostmonster expires in 80 days, so why renew for $100+/year just to house a few GB of client backups.
I wanted to use the Amazon S3 service for my backups with an amazing reliability and a low monthly cost, so I  went ahead crawling the web for bash scripts that would suit my situation. The one I liked the most was Here, but …

Computing »

[6 Jul 2008 | One Comment | ]

ns1.duivesteyn.prodns.net.au (125.214.65.30)
ns2.duivesteyn.prodns.net.au (125.214.67.202)

Code »

[3 Jul 2008 | No Comment | ]

define(’PATH’, ‘/www/public/images/’);
function destroy($dir) {
$mydir = opendir($dir);
while(false !== ($file = readdir($mydir))) {
if($file != “.” && $file != “..”) {
chmod($dir.$file, 0777);
if(is_dir($dir.$file)) {
chdir(’.’);
destroy($dir.$file.’/’);
rmdir($dir.$file) or DIE(”couldn’t delete $dir$file
“);
}
else
unlink($dir.$file) or DIE(”couldn’t delete $dir$file
“);
}
}
closedir($mydir);
}
destroy(PATH);

Computing »

[3 Jul 2008 | No Comment | ]

How to Add a Custom Function to MediaWiki « planetOzh

Code »

[2 Jul 2008 | No Comment | ]

<?
$ticker = ‘MSFT’; list($f, $d, $e) = explode(’-’, date(’Y-m-d’)); $d = $d - 1; $a = $d; $b = $e; $c = $f - 1; $url = ‘http://ichart.finance.yahoo.com/table.csv?s=’ . “$ticker&a=$a&b=$b&c=$c&d=$d&e=$e&f=$f&g=d&ignore=.csv”; $data = file($url); $n = count($data) - 1; $max_price = 0; $min_price = 9e12; for ($i = 1; $i < $n; $i++) { list($date, $open, $high, $low, $close, $volume, $adjClose) = explode(’,’, $data[$i]); $max_price = max($max_price, $high); $min_price = min($min_price, $low); } echo ”
$ticker 52-week range: $min_price — $max_price
“;
?>

Uncategorized »

[8 Jun 2008 | No Comment | ]

- delete all the files listed in /home/duiveste/public_html/locost/fantastico_fileslist.txt
- delete /home/duiveste/public_html/locost/fantastico_fileslist.txt
- Untar /home/duiveste/fantastico_backups/.backup.1212911666.tgz
- Empty the database duiveste_wrdp2
- Import the file /home/duiveste/fantastico_backups//backup.sql into the database duiveste_wrdp2
- Move /home/duiveste/fantastico_backups/ to /home/duiveste/public_html/locost

Uncategorized »

[1 Jun 2008 | No Comment | ]

http://www.duivesteyn.com.au/MBW-091.mp3