<?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>Slog - Carl Heaton &#187; code snippets</title>
	<atom:link href="http://slog.carlheaton.co.uk/index.php/category/code-snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://slog.carlheaton.co.uk</link>
	<description>Slog - slowly updating blog.</description>
	<lastBuildDate>Sat, 24 Jul 2010 23:29:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>find and awk for httpd owned files (with count and average)</title>
		<link>http://slog.carlheaton.co.uk/index.php/2010/07/find-and-awk-for-httpd-owned-files-with-count-and-average/</link>
		<comments>http://slog.carlheaton.co.uk/index.php/2010/07/find-and-awk-for-httpd-owned-files-with-count-and-average/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 23:29:27 +0000</pubDate>
		<dc:creator>Carl</dc:creator>
				<category><![CDATA[code snippets]]></category>
		<category><![CDATA[geek, servers & tech]]></category>

		<guid isPermaLink="false">http://slog.carlheaton.co.uk/?p=240</guid>
		<description><![CDATA[These are not very efficient (two sorts in one line for example) but for my needs work fine (improvements welcomed). Create a list of &#8220;filenames&#124;size in bytes&#8221; of all httpd owned files sorted by reverse size: find "/path/to/examine/" -user httpd -type f -printf '%p&#124;%s\n' &#124; sort -t \&#124; +1 -2 > httpd.usage.txt results: /path/to/examine/some/user/files/file0.jpg&#124;99995 /path/to/examine/some/user/files/file7.jpg&#124;99994 [...]]]></description>
		<wfw:commentRss>http://slog.carlheaton.co.uk/index.php/2010/07/find-and-awk-for-httpd-owned-files-with-count-and-average/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure sendmail with saslauthd for SMTP AUTH</title>
		<link>http://slog.carlheaton.co.uk/index.php/2010/05/configure-sendmail-with-saslauthd-for-sendmail-smtp-auth/</link>
		<comments>http://slog.carlheaton.co.uk/index.php/2010/05/configure-sendmail-with-saslauthd-for-sendmail-smtp-auth/#comments</comments>
		<pubDate>Sat, 15 May 2010 21:18:34 +0000</pubDate>
		<dc:creator>Carl</dc:creator>
				<category><![CDATA[code snippets]]></category>
		<category><![CDATA[geek, servers & tech]]></category>

		<guid isPermaLink="false">http://slog.carlheaton.co.uk/?p=224</guid>
		<description><![CDATA[Install: wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm rpm -Uv rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm yum install sendmail sendmail-cf cyrus-sasl-plain cd /etc/mail vi sendmail.mc change from: DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl change to: DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl add: define(`confAUTH_MECHANISMS’, `LOGIN PLAIN’)dnl add: TRUST_AUTH_MECH(`LOGIN PLAIN')dnl make sendmail.cf -C /etc/mail chkconfig sendmail on chkconfig saslauthd on /etc/init.d/sendmail start /etc/init.d/saslauthd start adduser someusername (the username to allow relay) passwd someusername (the username [...]]]></description>
		<wfw:commentRss>http://slog.carlheaton.co.uk/index.php/2010/05/configure-sendmail-with-saslauthd-for-sendmail-smtp-auth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>roundcube add subject to smtp_log</title>
		<link>http://slog.carlheaton.co.uk/index.php/2010/04/roundcube-add-subject-to-smtp_log/</link>
		<comments>http://slog.carlheaton.co.uk/index.php/2010/04/roundcube-add-subject-to-smtp_log/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 23:51:27 +0000</pubDate>
		<dc:creator>Carl</dc:creator>
				<category><![CDATA[code snippets]]></category>

		<guid isPermaLink="false">http://slog.carlheaton.co.uk/?p=216</guid>
		<description><![CDATA[vi program/steps/mail/func.inc change: if ($CONFIG['smtp_log']) { write_log('sendmail', sprintf("User %s [%s]; Message for %s; %s", $RCMAIL-&#62;user-&#62;get_username(), $_SERVER['REMOTE_ADDR'], $mailto, !empty($smtp_response) ? join('; ', $smtp_response) : '')); } to: if ($CONFIG['smtp_log']) { write_log('sendmail', sprintf("User %s [%s]; Message for %s; Subject: %s %s", $RCMAIL-&#62;user-&#62;get_username(), $_SERVER['REMOTE_ADDR'], $mailto, $headers['Subject'], !empty($smtp_response) ? join('; ', $smtp_response) : '')); }]]></description>
		<wfw:commentRss>http://slog.carlheaton.co.uk/index.php/2010/04/roundcube-add-subject-to-smtp_log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting 32bit RRD to 64bit RRD (moving cacti between architectures)</title>
		<link>http://slog.carlheaton.co.uk/index.php/2009/10/converting-32bit-rrd-to-64bit-rrd-moving-cacti-between-architectures/</link>
		<comments>http://slog.carlheaton.co.uk/index.php/2009/10/converting-32bit-rrd-to-64bit-rrd-moving-cacti-between-architectures/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 14:25:52 +0000</pubDate>
		<dc:creator>Carl</dc:creator>
				<category><![CDATA[code snippets]]></category>
		<category><![CDATA[geek, servers & tech]]></category>

		<guid isPermaLink="false">http://slog.carlheaton.co.uk/?p=184</guid>
		<description><![CDATA[While migrating cacti over to a new virtual machine I got &#8220;ERROR: This RRD was created on another architecture&#8221; in /var/log/httpd/error_log when the crontab ran resulting in blank graphs. On the 32 bit machine in /var/www/cacti/rra/ run in SSH: for i in `ls *. rrd`; do rrdtool dump $i &#62; $i.xml; done Transfer xml files [...]]]></description>
		<wfw:commentRss>http://slog.carlheaton.co.uk/index.php/2009/10/converting-32bit-rrd-to-64bit-rrd-moving-cacti-between-architectures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CentOS 5.3 Smokeping 2.4.2 Install (quick)</title>
		<link>http://slog.carlheaton.co.uk/index.php/2009/06/centos-5-3-smokeping-2-4-2-install-quick/</link>
		<comments>http://slog.carlheaton.co.uk/index.php/2009/06/centos-5-3-smokeping-2-4-2-install-quick/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 16:20:55 +0000</pubDate>
		<dc:creator>Carl</dc:creator>
				<category><![CDATA[code snippets]]></category>
		<category><![CDATA[geek, servers & tech]]></category>
		<category><![CDATA[centos 5.3]]></category>
		<category><![CDATA[Latency]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[smokeping yum install]]></category>

		<guid isPermaLink="false">http://slog.carlheaton.co.uk/?p=164</guid>
		<description><![CDATA[Install the latest smokeping (without distributed polling) on a virgin Centos 5.3 minimal box&#8230; It&#8217;s probably the best (free) tool for monitoring network latency at a glance. Examples: Pipe Ten Derby and Pipe Ten Sheffield. Install all of the smokeping prerequisites: wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm rpm -Uv rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm rm rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm yum update yum install rrdtool perl-CGI-SpeedyCGI fping [...]]]></description>
		<wfw:commentRss>http://slog.carlheaton.co.uk/index.php/2009/06/centos-5-3-smokeping-2-4-2-install-quick/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>CentOS 5.3 Zabbix 1.6.5 Install (quick)</title>
		<link>http://slog.carlheaton.co.uk/index.php/2009/06/centos-53-zabbix-165-install-quick/</link>
		<comments>http://slog.carlheaton.co.uk/index.php/2009/06/centos-53-zabbix-165-install-quick/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 12:08:57 +0000</pubDate>
		<dc:creator>Carl</dc:creator>
				<category><![CDATA[code snippets]]></category>
		<category><![CDATA[geek, servers & tech]]></category>

		<guid isPermaLink="false">http://slog.carlheaton.co.uk/?p=149</guid>
		<description><![CDATA[A quick reference for a from-scratch Zabbix install on CentOS 5.3. We&#8217;ve used Zabbix for the past 3 or 4 years and just implementing 1.6.5 across multiple Xen nodes for funky distributed monitoring. wget http://kent.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.6.5.tar.gz tar xvf zabbix-1.6.5.tar.gz yum install mysql-server mysql type &#62; create database zabbix type &#62; quit cd zabbix-1.6.5 service mysqld start [...]]]></description>
		<wfw:commentRss>http://slog.carlheaton.co.uk/index.php/2009/06/centos-53-zabbix-165-install-quick/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ardunio Visible Distance Detector v1.0 snippet</title>
		<link>http://slog.carlheaton.co.uk/index.php/2008/11/ardunio-visible-distance-detector-v10-snippet/</link>
		<comments>http://slog.carlheaton.co.uk/index.php/2008/11/ardunio-visible-distance-detector-v10-snippet/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 22:09:48 +0000</pubDate>
		<dc:creator>Carl</dc:creator>
				<category><![CDATA[code snippets]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[pwm]]></category>
		<category><![CDATA[srf02]]></category>

		<guid isPermaLink="false">http://slog.carlheaton.co.uk/?p=107</guid>
		<description><![CDATA[/* This code receives input from the SRF02 ultrasonic and maps the values to RGB outputs to a tri-colour LED. */ #include &#60;Wire.h&#62; int redPin = 3; // Red LED, connected to digital pin 9 int greenPin = 6; // Green LED, connected to digital pin 10 int bluePin = 5; // Blue LED, connected [...]]]></description>
		<wfw:commentRss>http://slog.carlheaton.co.uk/index.php/2008/11/ardunio-visible-distance-detector-v10-snippet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino and HD44780 LCD v1.0 snippet</title>
		<link>http://slog.carlheaton.co.uk/index.php/2008/09/arduino-and-hd44780-lcd-v10/</link>
		<comments>http://slog.carlheaton.co.uk/index.php/2008/09/arduino-and-hd44780-lcd-v10/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 22:04:53 +0000</pubDate>
		<dc:creator>Carl</dc:creator>
				<category><![CDATA[code snippets]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[HD44780]]></category>
		<category><![CDATA[LCD]]></category>

		<guid isPermaLink="false">http://blog.carlheaton.co.uk/?p=45</guid>
		<description><![CDATA[/* LCD display with 4 DataPins * -------- * * This is a example in how to use an LCD screen * configured with data transfers over 2 x 4 bits. The example * based on the "LCD Hola example" by DojoDave. * * There are the following pins to be considered: * * - [...]]]></description>
		<wfw:commentRss>http://slog.carlheaton.co.uk/index.php/2008/09/arduino-and-hd44780-lcd-v10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
