<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PHP Programmer</title>
	<atom:link href="http://www.phpprogrammer.co.nz/feed" rel="self" type="application/rss+xml" />
	<link>http://www.phpprogrammer.co.nz</link>
	<description>Hamish&#039;s blog all about PHP Programming</description>
	<lastBuildDate>Tue, 27 Nov 2012 20:24:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Email newsletter HTML/CSS rules</title>
		<link>http://www.phpprogrammer.co.nz/email-newsletter-htmlcss-rules</link>
		<comments>http://www.phpprogrammer.co.nz/email-newsletter-htmlcss-rules#comments</comments>
		<pubDate>Wed, 17 Oct 2012 20:09:28 +0000</pubDate>
		<dc:creator>hamish</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.phpprogrammer.co.nz/?p=66</guid>
		<description><![CDATA[I keep forgetting this rules I made for myself, so here they are. Target platforms: gmail, hotmail, yahoo, outlook 2007, outlook express, iphone mail, android gmail Basically, dont use a stylesheet &#8211; do inline styles on divs and spans (trust me &#8211; this will reduce your cross-browser issues) Dont use h1, h2, p, etc &#8211; [...]]]></description>
				<content:encoded><![CDATA[<p>I keep forgetting this rules I made for myself, so here they are. Target platforms:<br />
gmail, hotmail, yahoo, outlook 2007, outlook express, iphone mail, android gmail</p>
<ul>
<li>Basically, dont use a stylesheet &#8211; do inline styles on divs and spans (trust me &#8211; this will reduce your cross-browser issues)</li>
<li>Dont use h1, h2, p, etc &#8211; just use div and span (other tags have their own styles in yahoo etc)</li>
<li>Only use margins, don&#039;t use padding</li>
<li>Use margins, but only like this: margin-right, margin-bottom, margin-left</li>
<li>
So, you need top margin?: use a general padder like this:</p>
<pre>
&lt;div style="margin-bottom: 16px;"&gt;
&lt;table cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
</pre>
</li>
<li>Don&#039;t use colour shortcuts like this: #efe. Write it fully, eg: #eeffee</li>
<li>Need a solid line?
<pre>
&lt;div style="border-top: 1px solid black; font-size: 0px;"&gt;&amp;nbsp;&lt;/div&gt;
</pre>
<p>If you have set the line height in a parent div you might want to add
<pre>line-height: 0px</pre>
<p> to the above solid line div. Althought, I&#039;ve found it&#039;s best to avoid line-height altogether (outlook)
</li>
<li>Fine-print not fine enough in iPhone mail? (ok you&#039;re allowed to use stylesheet now :)
<pre>
&lt;style type="text/css"&gt;
div, span { -webkit-text-size-adjust:none; }
&lt;/style&gt; 
</pre>
<li>Need to right-align an image? Pop it in a table
<pre>
&lt;table cellpadding="0" cellspacing="0" align="right"&gt;
  &lt;tr&gt;
    &lt;td&gt;
      &lt;img src="image.jpg" alt="" /&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

</pre>
</li>
</li>
</ul>
<p>If you follow these strict rules you shouldn&#039;t be compaining about Outlook 2007 (lowest common denominator)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpprogrammer.co.nz/email-newsletter-htmlcss-rules/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UTF-8 setup (again) &#8211; for Debian Squeeze</title>
		<link>http://www.phpprogrammer.co.nz/utf-8-setup-again-for-debian-squeeze</link>
		<comments>http://www.phpprogrammer.co.nz/utf-8-setup-again-for-debian-squeeze#comments</comments>
		<pubDate>Thu, 08 Mar 2012 23:12:58 +0000</pubDate>
		<dc:creator>hamish</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.phpprogrammer.co.nz/?p=62</guid>
		<description><![CDATA[This post is mostly for my own reference &#8211; but maybe you will find it useful. Here are my current Linux, Apache, MySQL, PHP settings for supporting UTF-8 properly! Linux &#8212;&#8211; # dpkg-reconfigure locales I chose: en_NZ.UTF-8 UTF-8 Apache &#8212;&#8212; edit file /etc/apache2/conf.d/charset uncomment the line: AddDefaultCharset UTF-8 MySQL &#8212;&#8211; make sure these settings are [...]]]></description>
				<content:encoded><![CDATA[<p>This post is mostly for my own reference &#8211; but maybe you will find it useful. Here are my current Linux, Apache, MySQL, PHP settings for supporting UTF-8 properly!</p>
<p>Linux<br />
&#8212;&#8211;</p>
<p># dpkg-reconfigure locales</p>
<p>I chose: en_NZ.UTF-8 UTF-8</p>
<p>Apache<br />
&#8212;&#8212;</p>
<p>edit file /etc/apache2/conf.d/charset<br />
uncomment the line:<br />
AddDefaultCharset UTF-8</p>
<p>MySQL<br />
&#8212;&#8211;</p>
<p>make sure these settings are in /etc/mysql/my.cnf:</p>
<p>[mysqld]<br />
character_set_server=utf8<br />
collation_server=utf8_unicode_ci</p>
<p>[client]<br />
default-character-set=utf8</p>
<p>PHP<br />
&#8212;</p>
<p>make sure these settings are in /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini:</p>
<p>default_charset = utf-8</p>
<p>And in all scripts, when you make the mysql connection, always do this:</p>
<p>mysql_set_charset(&#039;utf8&#039;);</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpprogrammer.co.nz/utf-8-setup-again-for-debian-squeeze/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Speed test: PHP vs Perl vs Python vs Go vs C</title>
		<link>http://www.phpprogrammer.co.nz/speed-test-php-vs-perl-vs-python-vs-go-vs-c</link>
		<comments>http://www.phpprogrammer.co.nz/speed-test-php-vs-perl-vs-python-vs-go-vs-c#comments</comments>
		<pubDate>Mon, 30 Aug 2010 01:06:53 +0000</pubDate>
		<dc:creator>hamish</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://www.phpprogrammer.co.nz/?p=33</guid>
		<description><![CDATA[Recently I have needed to run a cron job every minute on a high load web server. As am currently most fluent in PHP I naturally wrote my script in PHP. However, as it&#039;s running every minute, I do want it to be as fast as possible. Seeing as the script was very simple, I [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I have needed to run a cron job every minute on a high load web server. As am currently most fluent in PHP I naturally wrote my script in PHP. However, as it&#039;s running every minute, I do want it to be as fast as possible. Seeing as the script was very simple, I thought that the most time required to run is in loading the PHP interpreter. Maybe i could use a compiled language instead? What about Google&#039;s new language Go?</p>
<p><strong>NOTE: This was not an overall speed test. I am just trying to find out which approach would be fastest for running a cron job every minute. None of the programs tested run through a web server.<br />
</strong></p>
<p>Anyway, for my test I wrote a &#034;hello, world&#034; command line app in each language and ran the program 1000 times. Without any further ado, here are the results, from fastest to slowest:</p>
<p>C: 5.37 seconds</p>
<p>Go: 6.23 seconds</p>
<p>Perl: 7.97 seconds</p>
<p>Python: 20.64 seconds</p>
<p>PHP: 41.31 seconds</p>
<p>There you go! PHP is a bit slow for this kind of thing! But I&#039;m not going to write all my scripts in Go or C now (what a hassle!). So, for me&#8230;. perl wins!</p>
<p>Ahh, good old perl, my faithful friend! I will never forget you!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpprogrammer.co.nz/speed-test-php-vs-perl-vs-python-vs-go-vs-c/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Ubuntu for mother in law = yay!</title>
		<link>http://www.phpprogrammer.co.nz/ubuntu-for-mother-in-law-yay</link>
		<comments>http://www.phpprogrammer.co.nz/ubuntu-for-mother-in-law-yay#comments</comments>
		<pubDate>Tue, 10 Nov 2009 05:31:08 +0000</pubDate>
		<dc:creator>hamish</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.phpprogrammer.co.nz/?p=21</guid>
		<description><![CDATA[As I wrote in previous post, my personal experience trying to use ubuntu as a php development box was very brief! However, i was impressed by the GUI side of things in Xubuntu (ubuntu but with the lightweight xfce desktop), and when my mother in law&#039;s (really!) laptop blew up &#8211; I took the opprtunity [...]]]></description>
				<content:encoded><![CDATA[<p>As I wrote in previous post, my personal experience trying to use ubuntu as a php development box was very brief!</p>
<p>However, i was impressed by the GUI side of things in Xubuntu (ubuntu but with the lightweight xfce desktop), and when my mother in law&#039;s (really!) laptop blew up &#8211; I took the opprtunity to spread the ubuntu/linux buzz up a generation! :)</p>
<p>My own windows desktop workstation (yes I use windows for my PHP programming &#8211; of course the PHP /apache side runs on linux!!) got a weird hardware problem, something to do with USB, and Windows kept rebooting itself, but linux boot cds worked fine&#8230; So I thought, oh well, if I cant really use this myself, why not chuck linux on it and give it away!</p>
<p>Mother-in-law literally just writes email and browses the web (maybe writing a few google docs) so i think linux gui is perfect for her&#8230;.</p>
<p>So&#8230; after a fairly easy install&#8230;. viola! My crappy old desktop is reborn as a super simple NET PC!!! She loves it!</p>
<p>Hooray for linux, hooray for Xubuntu &#8211; rescuing obsolete hardware worldwide! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpprogrammer.co.nz/ubuntu-for-mother-in-law-yay/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A brief flirtation with Ubuntu as development box</title>
		<link>http://www.phpprogrammer.co.nz/a-brief-flirtation-with-ubuntu-as-development-box</link>
		<comments>http://www.phpprogrammer.co.nz/a-brief-flirtation-with-ubuntu-as-development-box#comments</comments>
		<pubDate>Sat, 29 Aug 2009 01:42:48 +0000</pubDate>
		<dc:creator>hamish</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.phpprogrammer.co.nz/?p=16</guid>
		<description><![CDATA[Recently I&#039;ve been using this awesome persistent version of Xubuntu on my USB pen drive. It&#039;s great for fixing computers, virus scanning, etc. http://www.pendrivelinux.com/usb-xubuntu-904-persistent-install-windows/ It even detected my wireless adapter with no hassles &#8211; and the awesome thing is that all your settings are saved to disk!! I was so happy that I thought I&#039;d [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I&#039;ve been using this awesome persistent version of Xubuntu on my USB pen drive. It&#039;s great for fixing computers, virus scanning, etc.</p>
<p>http://www.pendrivelinux.com/usb-xubuntu-904-persistent-install-windows/</p>
<p>It even detected my wireless adapter with no hassles &#8211; and the awesome thing is that all your settings are saved to disk!!</p>
<p>I was so happy that I thought I&#039;d try xubuntu as a PHP/MySQL development box&#8230;</p>
<p>Installed great, looks good, BUT&#8230; OH NO .. mysql can&#039;t start anymore&#8230; some weird access problem!! argh!!!</p>
<p>I&#039;ve never had anything like this with Debian before&#8230; WTF is going on?!</p>
<p>Anyway, back to Debian for development. Ahhhh&#8230;. good old trusty Debian. YAY!!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpprogrammer.co.nz/a-brief-flirtation-with-ubuntu-as-development-box/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UTF-8 checklist</title>
		<link>http://www.phpprogrammer.co.nz/utf-8-checklist</link>
		<comments>http://www.phpprogrammer.co.nz/utf-8-checklist#comments</comments>
		<pubDate>Mon, 27 Apr 2009 04:31:44 +0000</pubDate>
		<dc:creator>hamish</dc:creator>
				<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://www.phpprogrammer.co.nz/utf-8-checklist</guid>
		<description><![CDATA[Character encodings have been driving me insane lately&#8230;. - stuff pasted from word wont display properly - funny square characters in the browser - smart  quotes from word don&#039;t display properly So here&#039; s a handy list of things i have been trying. Some things mgiht work for you, some might not. Let me know [...]]]></description>
				<content:encoded><![CDATA[<p>Character encodings have been driving me insane lately&#8230;.</p>
<p>- stuff pasted from word wont display properly</p>
<p>- funny square characters in the browser</p>
<p>- smart  quotes from word don&#039;t display properly</p>
<p>So here&#039; s a handy list of things i have been trying. Some things mgiht work for you, some might not. Let me know if you have anything to add!</p>
<p><strong>Apache</strong></p>
<p>AddDefaultCharset UTF-8</p>
<p><strong>MySQL</strong></p>
<p>On connect &#8211; SET NAMES &#039;utf8&#039;</p>
<p>Convert: ALTER TABLE tbl_name CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;<br />
or:</p>
<p>&lt;?<br />
$dbname = $argv[1];<br />
if(!$dbname) {<br />
print &#034;no database specified\n&#034;;<br />
exit;<br />
}<br />
$dbh = mysql_connect(&#039;localhost&#039;, &#039;username&#039;, &#039;password&#039;, 1);<br />
mysql_select_db($dbname);<br />
$sql = &#034;SHOW TABLES&#034;;<br />
$res = mysql_query($sql, $dbh);<br />
while($row = mysql_fetch_assoc($res)) {<br />
$sql2 = &#034;ALTER TABLE $row['Tables_in_{$dbname}'] CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci&#034;;<br />
print $sql2 . &#034;\n&#034;;<br />
}<br />
?&gt;</p>
<p>http://www.oreillynet.com/onlamp/blog/2006/01/turning_mysql_data_in_latin1_t.html</p>
<p>http://gentoo-wiki.com/TIP_Convert_latin1_to_UTF-8_in_MySQL</p>
<p>Also, once all of your databases are utf8 you could set these options in my.cnf:</p>
<p>[mysqld]<br />
default-character-set=utf8<br />
default-collation=utf8_unicode_ci</p>
<p>[client]<br />
default-character-set=utf8</p>
<p><strong>PHP/HTML</strong></p>
<p>&lt;meta http-equiv=&#034;content-type&#034; content=&#034;text/html; charset=utf8&#034; /&gt;<br />
use htmlentities like this:<br />
htmlentities($string, ENT_COMPAT, &#039;UTF-8&#039;)</p>
<p>Magpie RSS:<br />
$rss = new MagpieRSS($rss_string, &#039;UTF-8&#039;, &#039;UTF-8&#039;, false);</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpprogrammer.co.nz/utf-8-checklist/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to setup hobbit/xymon, including MySQL graphs</title>
		<link>http://www.phpprogrammer.co.nz/how-to-setup-hobbit-including-mysql-graphs</link>
		<comments>http://www.phpprogrammer.co.nz/how-to-setup-hobbit-including-mysql-graphs#comments</comments>
		<pubDate>Fri, 01 Aug 2008 08:50:58 +0000</pubDate>
		<dc:creator>hamish</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.phpprogrammer.co.nz/how-to-setup-hobbit-including-mysql-graphs</guid>
		<description><![CDATA[Updated 2011-06-20 &#8211; updated for &#039;xymon&#039; Setting up xymon client adduser --disabled-login xymon cd /usr/src wget http://downloads.sourceforge.net/project/xymon/Xymon/4.3.3/xymon-4.3.3.tar.gz tar -zxvf xymon-4.3.3.tar.gz cd xymon-4.3.3 ./configure.client (config=server) (user=xymon) (home=/home/xymon) make make install su - xymon -c "/home/xymon/client/runclient.sh start" Install MySQL/Apache Montioring on client 1. Create a mysql user &#039;monitoring&#039;, eg: CREATE USER 'monitoring'@'localhost' IDENTIFIED BY 'monitoring'; 2. Install [...]]]></description>
				<content:encoded><![CDATA[<p>Updated 2011-06-20 &#8211; updated for &#039;xymon&#039;</p>
<p><strong>Setting up xymon client </strong></p>
<pre>
adduser --disabled-login xymon
cd /usr/src
wget http://downloads.sourceforge.net/project/xymon/Xymon/4.3.3/xymon-4.3.3.tar.gz
tar -zxvf xymon-4.3.3.tar.gz
cd xymon-4.3.3
./configure.client
</pre>
<p>(config=server)<br />
(user=xymon)<br />
(home=/home/xymon)</p>
<pre>
make
make install
su - xymon -c "/home/xymon/client/runclient.sh start"
</pre>
<p><strong>Install MySQL/Apache Montioring on client</strong></p>
<p>1. Create a mysql user &#039;monitoring&#039;, eg:</p>
<pre>
CREATE USER 'monitoring'@'localhost' IDENTIFIED BY 'monitoring';
</pre>
<p>2. Install ext scripts::</p>
<pre>
cd /home/xymon/client
cvs -d:pserver:anon@cvs.hamish.geek.nz:/cvs co -d ext xymon-ext
chown xymon:xymon ext -R
chmod 700 ext -R
</pre>
<p>Set mysql password in the file:</p>
<pre>
bb-mysql.pl
</pre>
<p>Edit disk device in the files:</p>
<pre>
diskreads.sh
diskwrites.sh
</pre>
<p>Add lines to /home/xymon/client/etc/clientlaunch.cfg</p>
<pre>
[mysql]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/bb-mysql.pl
LOGFILE $XYMONCLIENTHOME/logs/bb-mysql.log
INTERVAL 5m

[mysqlhq]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/mysqlhq
LOGFILE $XYMONCLIENTHOME/logs/mysqlhq.log
INTERVAL 5m

[mysqlht]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/mysqlht
LOGFILE $XYMONCLIENTHOME/logs/mysqlht.log
INTERVAL 5m

[mysqlhs]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/mysqlhs
LOGFILE $XYMONCLIENTHOME/logs/mysqlhs.log
INTERVAL 5m

[apachew]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/apache-workers.sh
LOGFILE $XYMONCLIENTHOME/logs/apache-workers.log
INTERVAL 5m

[diskreads]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/diskreads.sh
LOGFILE $XYMONCLIENTHOME/logs/diskreads.log
INTERVAL 5m

[diskwrites]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/diskwrites.sh
LOGFILE $XYMONCLIENTHOME/logs/diskwrites.log
INTERVAL 5m

[coretemp]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/coretemp.pl
LOGFILE $XYMONCLIENTHOME/logs/coretemp.log
INTERVAL 5m
</pre>
<p>restart xymon:</p>
<pre>
su -c "/home/xymon/client/runclient.sh start" xymon
</pre>
<p><strong>Setting up xymon server</strong></p>
<p>Add to settings in /home/xymon/server/etc/xymonserver.cfg</p>
<pre>
TEST2RRD="EXISTING_STUFF,apachew=ncv,mysqlht=ncv,mysqlhs=ncv,mysqlhq=ncv,diskreads=ncv,diskwrites=ncv,coretemp=ncv"

GRAPHS="EXISTING_STUFF,apachew,mysqlhq,mysqlht,mysqlhs,diskreads,diskwrites,coretemp"

NCV_apachew="numworkers:GAUGE"
NCV_mysqlht="numthreads:GAUGE"
NCV_mysqlhs="slowqueries:GAUGE"
NCV_mysqlhq="queriespersec:GAUGE"
NCV_diskreads="diskreads:GAUGE"
NCV_diskwrites="diskwrites:GAUGE"
NCV_coretemp="core0:GAUGE,core1:GAUGE,core2:GAUGE,core3:GAUGE"
</pre>
<p>add sections to /home/xymon/server/etc/graphs.cfg</p>
<pre>
[apachew]
TITLE Apache Workers
YAXIS Num
DEF:workers=apachew.rrd:numworkers:AVERAGE
LINE2:workers#00CCCC:Apache workers
COMMENT:\n
GPRINT:workers:LAST:Apache workers \: %5.1lf%s (cur)
GPRINT:workers:MAX: \: %5.1lf%s (max)
GPRINT:workers:MIN: \: %5.1lf%s (min)
GPRINT:workers:AVERAGE: \: %5.1lf%s (avg)\n

[mysqlht]
TITLE MySQL Threads
YAXIS Num
DEF:threads=mysqlht.rrd:numthreads:AVERAGE
LINE2:threads#00CCCC:MySQL threads
COMMENT:\n
GPRINT:threads:LAST:MySQL threads \: %5.1lf%s (cur)
GPRINT:threads:MAX: \: %5.1lf%s (max)
GPRINT:threads:MIN: \: %5.1lf%s (min)
GPRINT:threads:AVERAGE: \: %5.1lf%s (avg)\n

[mysqlhs]
TITLE MySQL Slow Queries
YAXIS Num
DEF:slow=mysqlhs.rrd:slowqueries:AVERAGE
LINE2:slow#ff0000:Slow queries
COMMENT:\n
GPRINT:slow:LAST:Slow queries \: %5.1lf%s (cur)
GPRINT:slow:MAX: \: %5.1lf%s (max)
GPRINT:slow:MIN: \: %5.1lf%s (min)
GPRINT:slow:AVERAGE: \: %5.1lf%s (avg)\n

[mysqlhq]
TITLE MySQL Queries Per Second
YAXIS Num
DEF:qps=mysqlhq.rrd:queriespersec:AVERAGE
LINE2:qps#ff0000:Queries per sec
COMMENT:\n
GPRINT:qps:LAST:Queries per sec \: %5.1lf%s (cur)
GPRINT:qps:MAX: \: %5.1lf%s (max)
GPRINT:qps:MIN: \: %5.1lf%s (min)
GPRINT:qps:AVERAGE: \: %5.1lf%s (avg)\n

[diskreads]
TITLE Disk reads
YAXIS Num
DEF:diskreads=diskreads.rrd:diskreads:AVERAGE
LINE2:diskreads#00CCCC:Disk reads
COMMENT:\n
GPRINT:diskreads:LAST:Disk reads\: %5.1lf%s (cur)
GPRINT:diskreads:MAX: \: %5.1lf%s (max)
GPRINT:diskreads:MIN: \: %5.1lf%s (min)
GPRINT:diskreads:AVERAGE: \: %5.1lf%s (avg)\n

[diskwrites]
TITLE Disk writes
YAXIS Num
DEF:diskwrites=diskwrites.rrd:diskwrites:AVERAGE
LINE2:diskwrites#00CCCC:Disk writes
COMMENT:\n
GPRINT:diskwrites:LAST:Disk writes \: %5.1lf%s (cur)
GPRINT:diskwrites:MAX: \: %5.1lf%s (max)
GPRINT:diskwrites:MIN: \: %5.1lf%s (min)
GPRINT:diskwrites:AVERAGE: \: %5.1lf%s (avg)\n

[coretemp]
TITLE Core Temperature
YAXIS Degrees C
DEF:core0=coretemp.rrd:core0:AVERAGE
DEF:core1=coretemp.rrd:core1:AVERAGE
DEF:core2=coretemp.rrd:core2:AVERAGE
DEF:core3=coretemp.rrd:core3:AVERAGE
LINE2:core0#FF0000:Core 0
LINE2:core1#00FF00:Core 1
LINE2:core2#0000FF:Core 2
LINE2:core3#FF66BB:Core 3
COMMENT:\n
GPRINT:core0:LAST:Core 0 \: %3.1lf%s (cur)
GPRINT:core0:MAX: \: %3.1lf%s (max)
GPRINT:core0:MIN: \: %3.1lf%s (min)
GPRINT:core0:AVERAGE: \: %3.1lf%s (avg)\n
GPRINT:core1:LAST:Core 1 \: %3.1lf%s (cur)
GPRINT:core1:MAX: \: %3.1lf%s (max)
GPRINT:core1:MIN: \: %3.1lf%s (min)
GPRINT:core1:AVERAGE: \: %3.1lf%s (avg)\n
GPRINT:core2:LAST:Core 2 \: %3.1lf%s (cur)
GPRINT:core2:MAX: \: %3.1lf%s (max)
GPRINT:core2:MIN: \: %3.1lf%s (min)
GPRINT:core2:AVERAGE: \: %3.1lf%s (avg)\n
GPRINT:core3:LAST:Core 3 \: %3.1lf%s (cur)
GPRINT:core3:MAX: \: %3.1lf%s (max)
GPRINT:core3:MIN: \: %3.1lf%s (min)
GPRINT:core3:AVERAGE: \: %3.1lf%s (avg)\n

</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.phpprogrammer.co.nz/how-to-setup-hobbit-including-mysql-graphs/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Easy Setup of a CVS server on Debian Etch</title>
		<link>http://www.phpprogrammer.co.nz/easy-setup-of-a-cvs-server-on-debian-etch</link>
		<comments>http://www.phpprogrammer.co.nz/easy-setup-of-a-cvs-server-on-debian-etch#comments</comments>
		<pubDate>Sat, 26 Jul 2008 02:06:29 +0000</pubDate>
		<dc:creator>hamish</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.phpprogrammer.co.nz/easy-setup-of-a-cvs-server-on-debian-etch</guid>
		<description><![CDATA[I tore my hair out over this for quite a while yesterday. Hopefully this might help someone else (and as a reminder to my self if I ever need to do this again). Ideally I wanted the following scenario: - developer account &#039;hamish&#039; who can read/write to the cvs server - an anonymous account &#039;anon&#039; [...]]]></description>
				<content:encoded><![CDATA[<p>I tore my hair out over this for quite a while yesterday. Hopefully this might help someone else (and as a reminder to my self if I ever need to do this again). Ideally I wanted the following scenario:</p>
<p>- developer account &#039;hamish&#039; who can read/write to the cvs server<br />
- an anonymous account &#039;anon&#039; who can only read from the cvs server</p>
<p>I wanted the developer accounts to connect with ssh and anon via pserver, however&#8230;this seems like a mission! Perhaps this is why sourceforge (who do it this way) have a horrible delay between the developer and anonymous servers &#8211; maybe the 2 schemes wont cooperate nice and easily!?</p>
<p>Anyway, so I decided to use plain old pserver for both developer and anonymous account. This made my life a lot easier, and I&#039;m not that paranoid about security :)</p>
<p>Anyway, here goes&#8230;<br />
1. Install cvs and cvsd</p>
<p><strong>apt-get install cvs cvsd</strong></p>
<p>When configuring cvsd I was asked which repositories to serve. I typed &#039;/cvs&#039;.</p>
<p>This means my repository will be available at cvs.myserver.com/cvs</p>
<p>2. Initialise the repository</p>
<p><strong>cvs -d /var/lib/cvsd/cvs init</strong></p>
<p>add the following line in /var/lib/cvsd/cvs/CVSROOT/config:<br />
<strong>LockDir=/tmp</strong></p>
<p>3. Allow write access to repository</p>
<p><strong>chown cvsd:cvsd /var/lib/cvsd/cvs</strong></p>
<p>4. Allow history file to be written</p>
<p><strong>chown cvsd:cvsd /var/lib/cvsd/cvs/CVSROOT/history</strong></p>
<p>5. Add developer use account</p>
<p><strong>cvsd-passwd /var/lib/cvsd/cvs hamish</strong></p>
<p>6. Allow developer to write to repository</p>
<p><strong>echo &#034;hamish&#034; &gt; /var/lib/cvsd/cvs/CVSROOT/writers</strong></p>
<p>7. Setup anonymous account</p>
<p><strong>cvsd-passwd /var/lib/cvsd/cvs anon</strong></p>
<p>That&#039;s it! Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpprogrammer.co.nz/easy-setup-of-a-cvs-server-on-debian-etch/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox 3 excitement&#8230;.disappointment</title>
		<link>http://www.phpprogrammer.co.nz/firefox-3-excitementdisappointment</link>
		<comments>http://www.phpprogrammer.co.nz/firefox-3-excitementdisappointment#comments</comments>
		<pubDate>Wed, 21 Nov 2007 21:12:54 +0000</pubDate>
		<dc:creator>hamish</dc:creator>
				<category><![CDATA[Blah blah]]></category>

		<guid isPermaLink="false">http://www.phpprogrammer.co.nz/firefox-3-excitementdisappointment</guid>
		<description><![CDATA[I just read on slashdot &#8211; &#034;ZDNet picks up on yesterday&#039;s Firefox 3 beta 1 review by comparing the memory usage of Firefox 2 against the latest beta. The results from one of the tests is quite interesting, after loading 12 pages and waiting 5 minutes, 2 used 103,180KB and 3 used 62,312KB. IE used [...]]]></description>
				<content:encoded><![CDATA[<p>I just read on slashdot &#8211; &#034;ZDNet picks up on <a href="http://blogs.zdnet.com/hardware/?p=958">yesterday&#039;s  Firefox 3 beta 1 review</a> by <a href="http://blogs.zdnet.com/hardware/?p=960">comparing the memory usage of  Firefox 2 against the latest beta</a>. The results from one of the tests is quite interesting, after loading 12 pages and waiting 5 minutes, 2 used 103,180KB and 3 used 62,312KB. IE used 89,756KB.&#034;"</p>
<p>Oh how excited I was &#8211; the memory issues with FF 2 were why i went back to v1. Could I finally move on!?</p>
<p>The answer&#8230;&#8230;&#8230;.NO!!</p>
<p>The simple task of removing a link from my bookmarks toolbar sent FF3 into a spin&#8230;memory usage 720,000k and counting!! LOL!</p>
<p>What a joke.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpprogrammer.co.nz/firefox-3-excitementdisappointment/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Downgrade to Firefox 1.5 &#8211; Firefox 2 is a lemon!</title>
		<link>http://www.phpprogrammer.co.nz/downgrade-to-firefox-15-firefox-2-is-a-lemon</link>
		<comments>http://www.phpprogrammer.co.nz/downgrade-to-firefox-15-firefox-2-is-a-lemon#comments</comments>
		<pubDate>Fri, 09 Nov 2007 01:57:19 +0000</pubDate>
		<dc:creator>hamish</dc:creator>
				<category><![CDATA[Blah blah]]></category>

		<guid isPermaLink="false">http://www.phpprogrammer.co.nz/downgrade-to-firefox-15-firefox-2-is-a-lemon</guid>
		<description><![CDATA[Ah, what a brilliant day. For months now I&#039;ve been swearing about how bad Firefox 2 is &#8211; memory leaks, slow loading, crashing &#8211; it&#039;s been the bane of my coding life. Anyway, finally today I took the time to scour the net for good old Firefox 1.5 &#8211; you can&#039;t get it from the [...]]]></description>
				<content:encoded><![CDATA[<p>Ah, what a brilliant day. For months now I&#039;ve been swearing about how bad Firefox 2 is &#8211; memory leaks, slow loading, crashing &#8211; it&#039;s been the bane of my coding life. Anyway, finally today I took the time to scour the net for good old Firefox 1.5 &#8211; you can&#039;t get it from the official firefox site. Anyway here it is:</p>
<p>http://filehippo.com/download_firefox/?2743</p>
<p>I can&#039;t believe how much faster it is! My productivity has gone through the roof!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpprogrammer.co.nz/downgrade-to-firefox-15-firefox-2-is-a-lemon/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
