<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.7.3" -->
<rss version="2.0">
	<channel>
		<title>Blog entries posted in Tech Diary Entry</title>
		<description>Blog entries posted in Tech Diary Entry</description>
		<link>http://www.tech-diary.com</link>
		<lastBuildDate>Sat, 31 Jul 2010 21:08:01 +0100</lastBuildDate>
        <generator>FeedCreator 1.7.3</generator>
		<item>
			<title>Minimal Matching in Vim</title>
			<link>http://www.tech-diary.com/minimal-matching-in-vim.html</link>
			<description>&lt;p&gt;One of the first things anyone who tackles regular expressions (regex) learns is the &quot;.*&quot; construct, which matches any character any number of times.&amp;nbsp; What is sometimes overlooked is that the * is greedy, in that it grabs any character as many times as it can.&amp;nbsp; And while that's frequently useful, there are times where you want it to grab it as few times as it can.&amp;nbsp; This is called &quot;minimal matching&quot;.&amp;nbsp; For those familiar with Perl's minimal matching operator, '?', it turns oRead More...</description>
			<author>Brad Waite</author>
			<pubDate>Sun, 21 Mar 2010 19:56:47 +0100</pubDate>
		</item>
		<item>
			<title>split() function in mysql</title>
			<link>http://www.tech-diary.com/split-function-in-mysql.html</link>
			<description>&lt;p&gt;The following function definition creates a split() function that splits a string by a given delimiter and returns the specified element.&lt;/p&gt;&lt;br/&gt;DROP FUNCTION IF EXISTS split;&lt;br /&gt;CREATE FUNCTION split (str TEXT, delim VARCHAR(1), N INT)&lt;br /&gt;RETURNS TEXT DETERMINISTIC&lt;br /&gt;RETURN SUBSTRING(SUBSTRING_INDEX(str, delim, N), LENGTH(SUBSTRING_INDEX(str, delim, N - 1)) + LENGTH(delim) + (N &amp;gt; 1))&lt;br /&gt;&lt;br/&gt;&lt;p&gt;The syntax of the function is as follows.&lt;/p&gt;&lt;br/&gt;split(str, separator, pos)</description>
			<author>Brad Waite</author>
			<pubDate>Thu, 14 Jan 2010 00:49:11 +0100</pubDate>
		</item>
		<item>
			<title>Counting characters in vim</title>
			<link>http://www.tech-diary.com/counting-characters-in-vim.html</link>
			<description>&lt;p&gt;There's several ways to count the number of characters in a file within vim.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;The 'n' modifier to the substitute operator ('s') tells vim only to report the number of matches, but not to actually do any substitutions.&amp;nbsp; Given that, the following command will report the number of characters in our file:&lt;/p&gt;&lt;br/&gt;:%s/.//gn&lt;br/&gt;&lt;p&gt;That says, &quot;find ('s///n') every occurrence ('g') of any character ('.') in all lines ('%').&quot;&amp;nbsp; Note that this will not include any line break characters.&amp;nbsp; TRead More...</description>
			<author>Brad Waite</author>
			<pubDate>Fri, 23 Oct 2009 15:56:58 +0100</pubDate>
		</item>
		<item>
			<title>dspam not checking emails</title>
			<link>http://www.tech-diary.com/dspam-not-checking-emails.html</link>
			<description>&lt;p&gt;I've been plagued with a recurring problem with dspam that I had been unable to track down for months.&amp;nbsp; While dspam catches nearly every spam that comes into my Inbox, I noticed a pattern of email that not only weren't flagged as spam, they apparently weren't even checked by dspam; there were no X-DSPAM headers in the email.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;I spent hours tracking down whether there were any qmail aliases that were dropping mail directly into users Maildirs, since that would explain what I was seeRead More...</description>
			<author>Brad Waite</author>
			<pubDate>Mon, 05 Oct 2009 23:05:06 +0100</pubDate>
		</item>
		<item>
			<title>AUser Manager</title>
			<link>http://www.tech-diary.com/auser-manager.html</link>
			<description>&lt;p&gt;AUser Manager is a fantastic component that adds much-needed security to the Joomla! user registration process.&amp;nbsp; It transparently adds full-featured AJAX Captcha and RBL tests, all without any hacks or modifications to core Joomla! files.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;I've attached a slightly modified version of 1.5.10 that has the following &quot;improvements&quot;:&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;AUser Manager parameter options to disable the strong password generator, username available AJAX notice &amp;amp; password meter.&amp;nbsp; They're enabled bRead More...</description>
			<author>Brad Waite</author>
			<pubDate>Sun, 04 Oct 2009 18:52:49 +0100</pubDate>
		<category>Joomla</category>
 <category>Captcha</category>
 <category>AUser Manager</category>
		</item>
		<item>
			<title>Vim: insert line numbers</title>
			<link>http://www.tech-diary.com/vim-insert-line-numbers.html</link>
			<description>&lt;p&gt;To insert line numbers at the beginning of every line in Vim, do this:&lt;/p&gt;&lt;br/&gt;&lt;p&gt;:%s/^/\=line(&quot;.&quot;)&lt;/p&gt;&lt;br/&gt;&lt;p&gt;This is a global search and replace (%s/[search]/[replace]), matching the beginning of each line (^) with an expression (\=) that returns the current line number (line(&quot;.&quot;)).&lt;/p&gt;&lt;br/&gt;&lt;p&gt;To add a comma (or any other character) after the line number, do it like this:&lt;/p&gt;&lt;br/&gt;&lt;p&gt;:%s/^/\=line(&quot;.&quot;) . &quot;,&quot;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;Any valid Vim expression is valid after the &quot;\=&quot;, so you could start line number with 100 likeRead More...</description>
			<author>Brad Waite</author>
			<pubDate>Mon, 28 Sep 2009 17:12:54 +0100</pubDate>
		<category>vim</category>
 <category>search and replace</category>
		</item>
		<item>
			<title>remote syslog</title>
			<link>http://www.tech-diary.com/remote-syslog.html</link>
			<description>&lt;p&gt;syslog is the standard system logging tool on most flavors of unix.&amp;nbsp; It stores records of system events in a number of user-defined files.&amp;nbsp; On FreeBSD, these files live by default in /var/log.&amp;nbsp; syslog has a configuration file, /etc/syslog.conf, that determines which file to log system events.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;What a lot of people don't know is that syslog can send events to a remote syslog server.&amp;nbsp; This means you can have all of your logs from multiple machines stored on a single hoRead More...</description>
			<author>Brad Waite</author>
			<pubDate>Sat, 26 Sep 2009 17:05:04 +0100</pubDate>
		<category>system administration</category>
 <category>remote syslog</category>
 <category>freebsd</category>
		</item>
		<item>
			<title>Shutdown or Restart Vista from Remote Desktop</title>
			<link>http://www.tech-diary.com/shutdown-or-restart-vista-from-remote-desktop.html</link>
			<description>&lt;p&gt;Here's a couple of ways to do that:&lt;/p&gt;Alt-F4 brings up the standard shutdown dialog.From a command prompt type: shutdown -r -t 0</description>
			<author>Brad Waite</author>
			<pubDate>Fri, 05 Jun 2009 06:00:00 +0100</pubDate>
		</item>
		<item>
			<title>Hide Desktop.ini files in Windows 7 &amp; Vista</title>
			<link>http://www.tech-diary.com/hide-windows-7-vista-desktopini-files.html</link>
			<description>&lt;p&gt;One of the first things I do when setting up a new Windows machine is enable the option to &quot;Show hidden files and folders&quot; and disable the option to &quot;Hide protected operating system files (Recommended)&quot;.&amp;nbsp; You can do this in the Folder Options control panel on the View tab.&amp;nbsp; Then I can see everything on my drive, even the stuff Microsoft thinks is too dangerous for me to see.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;On Win 2K and XP, this works great, but in Windows 7 / Vista there's a little snag.&amp;nbsp; The Desktop.Read More...</description>
			<author>Brad Waite</author>
			<pubDate>Fri, 05 Jun 2009 06:00:00 +0100</pubDate>
		</item>
		<item>
			<title>&quot;Delete&quot; renamed Startup folder</title>
			<link>http://www.tech-diary.com/delete-renamed-startup-folder.html</link>
			<description>&lt;p&gt;When I was trying to troubleshoot some XP startup issues, I decided to rename the Start-&amp;gt;Programs-&amp;gt;Startup folder to &amp;quot;_Startup&amp;quot;, thinking it would disable any startup programs.&lt;/p&gt;&lt;p&gt;Turns out the folder is somehow flagged as a startup folder, and no matter what it's called, the programs will still start up.&amp;nbsp; In addition, Windows will create a new Startup folder.&amp;nbsp; Now I've got both a &amp;quot;Startup&amp;quot; and a &amp;quot;_Startup&amp;quot; in my Programs.&amp;nbsp; I can't delete Read More...</description>
			<author>Brad Waite</author>
			<pubDate>Mon, 01 Jun 2009 06:00:00 +0100</pubDate>
		</item>
		<item>
			<title>Package  has no origin recorded</title>
			<link>http://www.tech-diary.com/package-n-has-no-origin-recorded.html</link>
			<description>&lt;p&gt;After adding the HighPoint RocketRaid software package to FreeBSD, I'm now getting the following errors whenever I add or delete a package or port:&lt;/p&gt;&lt;p&gt;pkg_add: package hptraidconf-3.2 has no origin recorded&lt;br /&gt;pkg_add: package hptsvr-3.13 has no origin recorded&lt;/p&gt;&lt;p&gt;The &amp;quot;origin&amp;quot; is normally the directory in the ports tree from which the package was built.&amp;nbsp; However, the 3rd-party HighPoint packages aren't part of the standard FreeBSD ports tree, and so the pkg_* utilities Read More...</description>
			<author>Brad Waite</author>
			<pubDate>Sat, 30 May 2009 06:00:00 +0100</pubDate>
		</item>
		<item>
			<title>Create SSL Certificate Signing Request (CSR) with OpenSSL for Apache</title>
			<link>http://www.tech-diary.com/create-ssl-certificate-signing-request-csr-with-openssl-for-apache.html</link>
			<description>Overview&lt;br /&gt;-------&lt;p&gt;For new SSL servers:&lt;/p&gt;&lt;p&gt;        1. Generate new server key&lt;br /&gt;        2. Generate CSR&lt;br /&gt;        3. Have key signed&lt;br /&gt;        4. Install signed key&lt;/p&gt;&lt;p&gt;For existing SSL servers:&lt;/p&gt;&lt;p&gt;        1. Generate CSR&lt;br /&gt;        2. Have key signed&lt;br /&gt;        3. Install signed key&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Generate new server key&lt;br /&gt;-----------------------&lt;/p&gt;&lt;p&gt;This creates a new 1024 bit server key named website.key:&lt;/p&gt;&lt;p&gt;# openssl genrsa -out website.key 1024&lt;br /&gt;GenRead More...</description>
			<author>Brad Waite</author>
			<pubDate>Mon, 25 May 2009 06:00:00 +0100</pubDate>
		<category>ssl</category>
 <category>freebsd</category>
 <category>certificates</category>
 <category>apache</category>
		</item>
		<item>
			<title>Mount a Windows XP share under FreeBSD</title>
			<link>http://www.tech-diary.com/mount-a-windows-xp-share-under-freebsd.html</link>
			<description>mount_smbfs -U  -I  -W  /// &lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;mount_smbfs -U fred -I fileserver -W WORKGROUP //fileserver/files /mnt&lt;/p&gt;</description>
			<author>Brad Waite</author>
			<pubDate>Mon, 25 May 2009 06:00:00 +0100</pubDate>
		<category>xp</category>
 <category>windows</category>
 <category>samba</category>
 <category>mount</category>
 <category>freebsd</category>
		</item>
		<item>
			<title>&quot;The Windows Installer Service Could Not Be Accessed&quot;</title>
			<link>http://www.tech-diary.com/the-windows-installer-service-could-not-be-accessed.html</link>
			<description>&lt;p&gt;After recovering from a failed XP registry software hive, my Windows Installer is reporting this error:&lt;/p&gt;&lt;p&gt;&amp;quot;The Windows Installer Service Could Not Be Accessed&amp;quot;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The Microsoft KB says to perform the following functions:&lt;/p&gt;&lt;p&gt;msiexec /unregister&lt;/p&gt;&lt;p&gt;msiexec /register&lt;/p&gt;&lt;p&gt;However, when I do that I get a &amp;quot;Incorrect function&amp;quot; error. MS says the next step is a repair installation.&amp;nbsp; I'm going to play with a few things first.&lt;/p&gt;</description>
			<author>Brad Waite</author>
			<pubDate>Wed, 20 May 2009 06:00:00 +0100</pubDate>
		</item>
		<item>
			<title>&quot;The registry cannot load the hive&quot; - Corrupted XP registry</title>
			<link>http://www.tech-diary.com/the-registry-cannot-load-the-hive-corrupted-xp-registry.html</link>
			<description>&lt;p&gt;I nearly toasted my XP machine today.&amp;nbsp; Somehow, between installing some software, running a keygen that may have infected my machine with a virus, running a system restore and installing the latest updates, the software hive of my registry became corrupted.&lt;/p&gt;&lt;p&gt;On boot, I'd get a BSOD with the following error:&lt;/p&gt;&lt;p&gt;Stop: c0000218 {Registry File Failure}&amp;nbsp; The registry cannot load the hive (file): \SystemRoot\System32\Config\SOFTWARE or its log or alternate.&lt;/p&gt;&lt;p&gt;Microsoft has a KRead More...</description>
			<author>Brad Waite</author>
			<pubDate>Wed, 20 May 2009 06:00:00 +0100</pubDate>
		</item>
		<item>
			<title>FreeBSD IPMI</title>
			<link>http://www.tech-diary.com/freebsd-ipmi.html</link>
			<description>&lt;p&gt;kldload ipmi or build into kernel to have local access.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;To check server event log:&lt;br /&gt;ipmitool sel info&lt;/p&gt;&lt;br/&gt;&lt;p&gt;To access remote IPMI server:&lt;br /&gt;-I lan -H [0.0.0.0]&lt;/p&gt;&lt;br/&gt;&lt;p&gt;To print channel info for channel 6:&lt;br /&gt;ipmitool channel info 6&lt;/p&gt;&lt;br/&gt;&lt;p&gt;To print lan config on channel 7:&lt;br /&gt;ipmitool lan print 7&lt;/p&gt;&lt;br/&gt;&lt;p&gt;This set the authentication types on channel 7:&lt;br /&gt;ipmitool lan set 7 auth CALLBACK NONE,MD2,MD5,PASSWORD&lt;br /&gt;ipmitool lan set 7 auth USER NONE,MD2,MD5,PASSWORD&lt;br /&gt;ipmitoRead More...</description>
			<author>Brad Waite</author>
			<pubDate>Tue, 05 May 2009 06:00:00 +0100</pubDate>
		</item>
		<item>
			<title>FreeBSD watchdog</title>
			<link>http://www.tech-diary.com/freebsd-watchdog.html</link>
			<description>&lt;p&gt;FreeBSD supports watchdog timers in the kernel.&amp;nbsp; If a timer is set, and not reset or disabled within the specified time, the kernel can reboot the machine.&lt;/p&gt;&lt;p&gt;'watchdog -t ' starts a watchdog for n seconds.  Runing watchdog(8) again in again in &amp;lt;n seconds, resets the timer.  If 'watchdog -t 0' is run, the kernel disables the watchdog.&lt;/p&gt;&lt;p&gt;watchdogd(8) either runs stat(2) on /etc, or a user-defined cmd (with -e), and resets the watchdog only on a zero exit code.&lt;/p&gt;&lt;p&gt;Examples: &lt;/Read More...</description>
			<author>Brad Waite</author>
			<pubDate>Tue, 05 May 2009 06:00:00 +0100</pubDate>
		</item>
		<item>
			<title>Capture smtp email from command line with tshark</title>
			<link>http://www.tech-diary.com/capture-smtp-email-from-command-line-with-tshark.html</link>
			<description>tshark -i em0 -f&amp;quot;host 127.0.0.1 and port 25&amp;quot; -R&amp;quot;smtp&amp;quot;</description>
			<author>Brad Waite</author>
			<pubDate>Thu, 30 Apr 2009 06:00:00 +0100</pubDate>
		</item>
		<item>
			<title>mavik Thumbnails</title>
			<link>http://www.tech-diary.com/mavik-thumbnails.html</link>
			<description>&lt;p&gt;mavik Thumbnails is a simple plugin for Joomla! that automatically creates thumbnails for any and all images in your content.&amp;nbsp; Just like any other Joomla plugin, it's simple to install and configure.&amp;nbsp; However, I struggled for hours to get it to work, particularly with MyBlog for use here on Tech Diary.&amp;nbsp; Turns out it was working exactly like it was supposed to and I didn't know it.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&amp;nbsp;Here's how to use it:&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;Install &amp;amp; enable mavik Thumbnails&lt;br/&gt;Insert an image intoRead More...</description>
			<author>Brad Waite</author>
			<pubDate>Fri, 03 Apr 2009 06:00:00 +0100</pubDate>
		</item>
		<item>
			<title>CSV Improved for Joomla 1.5</title>
			<link>http://www.tech-diary.com/csv-improved-for-joomla-1.5.html</link>
			<description>&lt;p&gt;CSV Improved for Joomla 1.5 is the fastest and best way to quickly and easily populate your Joomla 1.5 VirtueMart store.&lt;/p&gt; &lt;p&gt;We're setting up several new web stores that will be selling a variety of items.&amp;nbsp; VirtueMart is the most popular e-store / shopping cart component for Joomla 1.5 and I've used it a number of times in the past.&amp;nbsp; After spending a few years fighting with osCommerce, VirtueMart is an absolute thrill to implement.&lt;/p&gt; &lt;p&gt;&lt;img style=&quot;float: right&quot; src=&quot;http://wwwRead More...</description>
			<author>Brad Waite</author>
			<pubDate>Sat, 21 Mar 2009 06:00:00 +0100</pubDate>
		<category>shopping cart</category>
 <category>Joomla</category>
 <category>ecommerce</category>
 <category>CSV Improved</category>
		</item>
	</channel>
</rss>
