<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>An Cuasán</title>
	<atom:link href="http://cuasan.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cuasan.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Wed, 23 Sep 2009 21:30:08 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='cuasan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/6f87d6098e989c875332c203acd5e0de?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>An Cuasán</title>
		<link>http://cuasan.wordpress.com</link>
	</image>
			<item>
		<title>iSync and Nokia 5310 XpressMusic</title>
		<link>http://cuasan.wordpress.com/2009/09/23/isync-and-nokia-5310-xpressmusic/</link>
		<comments>http://cuasan.wordpress.com/2009/09/23/isync-and-nokia-5310-xpressmusic/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 21:30:08 +0000</pubDate>
		<dc:creator>dmom</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cuasan.wordpress.com/2009/09/23/isync-and-nokia-5310-xpressmusic/</guid>
		<description><![CDATA[Just got one of these syncing for a colleague. Found nothing on the nokia site, tried their plugin for the 5320 &#8211; which didn&#8217;t work.
Then I tried this third party plugin, http://pyxx.org/nokia-5310-xpressmusic-isync-plugin/
Worked first time (had to close and restart iSync). Great job folks!
Posted in Uncategorized       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=131&subd=cuasan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just got one of these syncing for a colleague. Found nothing on the nokia site, tried their plugin for the 5320 &#8211; which didn&#8217;t work.<br />
Then I tried this third party plugin, http://pyxx.org/nokia-5310-xpressmusic-isync-plugin/</p>
<p>Worked first time (had to close and restart iSync). Great job folks!</p>
Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cuasan.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cuasan.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cuasan.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cuasan.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cuasan.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cuasan.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cuasan.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cuasan.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cuasan.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cuasan.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=131&subd=cuasan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cuasan.wordpress.com/2009/09/23/isync-and-nokia-5310-xpressmusic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f5b4f043baa2ee62e54da395d6aea29?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmom</media:title>
		</media:content>
	</item>
		<item>
		<title>Dos2Unix type conversion on Mac OS</title>
		<link>http://cuasan.wordpress.com/2009/08/23/dos2unix-type-conversion-on-mac-os/</link>
		<comments>http://cuasan.wordpress.com/2009/08/23/dos2unix-type-conversion-on-mac-os/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 18:31:41 +0000</pubDate>
		<dc:creator>dmom</dc:creator>
				<category><![CDATA[TechIt]]></category>

		<guid isPermaLink="false">http://cuasan.wordpress.com/?p=116</guid>
		<description><![CDATA[As simple as:
tr '\r' '\n' &#60; file-with-dos-newline.txt &#62; file-with-mac-newline.txt
Posted in TechIt       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=116&subd=cuasan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As simple as:</p>
<p><code>tr '\r' '\n' &lt; file-with-dos-newline.txt &gt; file-with-mac-newline.txt</code></p>
Posted in TechIt  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cuasan.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cuasan.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cuasan.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cuasan.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cuasan.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cuasan.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cuasan.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cuasan.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cuasan.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cuasan.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=116&subd=cuasan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cuasan.wordpress.com/2009/08/23/dos2unix-type-conversion-on-mac-os/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f5b4f043baa2ee62e54da395d6aea29?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmom</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting longtitude and latitude coordinates from the centre of a google map</title>
		<link>http://cuasan.wordpress.com/2009/08/20/getting-longtitude-and-latitude-coordinates-from-the-centre-of-a-google-map/</link>
		<comments>http://cuasan.wordpress.com/2009/08/20/getting-longtitude-and-latitude-coordinates-from-the-centre-of-a-google-map/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 20:14:56 +0000</pubDate>
		<dc:creator>dmom</dc:creator>
				<category><![CDATA[TechIt]]></category>

		<guid isPermaLink="false">http://cuasan.wordpress.com/?p=111</guid>
		<description><![CDATA[Googles long/lat is degrees only and a fractional component.
This script
javascript:coord = [gApplication.getMap().getCenter().lat(),gApplication.getMap().getCenter().lng()];
output = '';
for (x in [0,1]) {
neg = (coord[x] &#60; 0);
if (neg) coord[x] *= -1;
deg = Math.floor(coord[x]);
minr = (coord[x] - deg) * 60;
min = Math.floor(minr);
sec = Math.floor((minr - min) * 60 * 100000)/100000;
output += (x==0?'Lat':', Long') + ': ' + deg + "° " [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=111&subd=cuasan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Googles long/lat is degrees only and a fractional component.</p>
<p>This script<br />
<code>javascript:coord = [gApplication.getMap().getCenter().lat(),gApplication.getMap().getCenter().lng()];<br />
output = '';<br />
for (x in [0,1]) {<br />
neg = (coord[x] &lt; 0);<br />
if (neg) coord[x] *= -1;<br />
deg = Math.floor(coord[x]);<br />
minr = (coord[x] - deg) * 60;<br />
min = Math.floor(minr);<br />
sec = Math.floor((minr - min) * 60 * 100000)/100000;<br />
output += (x==0?'Lat':', Long') + ': ' + deg + "° " + (min &lt; 10?'0':'') + min + "' " + (sec &lt; 10?'0':'') + sec + '" ' + (x==0?(neg?'S':'N'):(neg?'W':'E'));<br />
};<br />
void(prompt('', output));</code><br />
decomposed that into degrees, minutes and seconds. The output was like the bellow.</p>
<p><code>Lat: 51° 40' 23.49798" N, Long: 8° 30' 06.43386" W<br />
</code><br />
I wanted it to output degrees, minutes, and then a fractional component like the below, as was required by my Garmin mapping software (I was pulling location coordinates from google maps and inserting them as waypoints/route-vias in my Garmin app for uploading to my GPS device).</p>
<p><code>N51 40.39163302364358 W8 30.10723114013672<br />
</code><br />
I tweaked it to return same.</p>
<p>I created a bookmark on the Bookmark Toolbar of my browser, and set the code below as the target/URL.</p>
<p>To use it I simply click the bookmark button for it when looking at a google map, and the coordinates for the location at map centre are given in a pop-up box.</p>
<p>Here is my ammended version of script.</p>
<p><code>javascript:coord=[gApplication.getMap().getCenter().lat(),gApplication.getMap().getCenter().lng()];<br />
output='';<br />
for(x in [0,1]){<br />
neg=(coord[x]&lt;0);<br />
coord[x]=Math.abs(coord[x]);<br />
deg=Math.floor(coord[x]);<br />
minr=(coord[x]-deg)*60;<br />
//min=Math.floor(minr);<br />
//sec=Math.floor((minr - min)*60*100000)/100000;<br />
min = minr;<br />
output+=(x==0?(neg?'S':'N'):(neg?'W':'E'))+deg+" "+(min&lt;10?'0':'')+min+" ";<br />
};<br />
void(prompt('Coordinates',output));</code></p>
<p>Update: <a title="http://netsharc.wordpress.com/2007/06/11/google-maps-latitude-and-longitude/ " href="http://netsharc.wordpress.com/2007/06/11/google-maps-latitude-and-longitude/">http://netsharc.wordpress.com/2007/06/11/google-maps-latitude-and-longitude/</a> has the original and a few tweaks.</p>
Posted in TechIt  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cuasan.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cuasan.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cuasan.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cuasan.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cuasan.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cuasan.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cuasan.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cuasan.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cuasan.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cuasan.wordpress.com/111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=111&subd=cuasan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cuasan.wordpress.com/2009/08/20/getting-longtitude-and-latitude-coordinates-from-the-centre-of-a-google-map/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f5b4f043baa2ee62e54da395d6aea29?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmom</media:title>
		</media:content>
	</item>
		<item>
		<title>Mac : Open Terminal/iTerm here</title>
		<link>http://cuasan.wordpress.com/2009/08/19/mac-open-iterm-here/</link>
		<comments>http://cuasan.wordpress.com/2009/08/19/mac-open-iterm-here/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 12:31:01 +0000</pubDate>
		<dc:creator>dmom</dc:creator>
				<category><![CDATA[TechIt]]></category>

		<guid isPermaLink="false">http://cuasan.wordpress.com/?p=91</guid>
		<description><![CDATA[Using Mac OS X and browsing the file system with &#8216;Finder&#8217;, I often want to open Terminal or iTerm and have the default path set to the current Finder folder.
Firstly Terminal. I found a script called &#8216;Open Terminal Here&#8217; at http://jo.irisson.free.fr/?p=59
This seems to suffer from an issue where two windows are opened if Terminal was not already [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=91&subd=cuasan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Using Mac OS X and browsing the file system with &#8216;Finder&#8217;, I often want to open Terminal or iTerm and have the default path set to the current Finder folder.</p>
<p>Firstly Terminal. I found a script called &#8216;Open Terminal Here&#8217; at <a title="http://jo.irisson.free.fr/?p=59  " href="http://jo.irisson.free.fr/?p=59">http://jo.irisson.free.fr/?p=59</a></p>
<p>This seems to suffer from an issue where two windows are opened if Terminal was not already running.</p>
<p>Then I started using <a title="iTerm homepage" href="http://iterm.sourceforge.net/">iTerm</a>, it has a few more/different options than Terminal. For it I found a script &#8216;Open iTerm Here&#8217; at <a title="http://snippets.dzone.com/posts/show/961" href="http://snippets.dzone.com/posts/show/961">http://snippets.dzone.com/posts/show/961</a></p>
<p>This seems to suffer from a similiar issue to above, where two tabs in a new iTerm window are opened if iTerm was not already running. I tried to modify it (my first apple script attempt) but managed only to get two windows open instead of a single window with two tabs.</p>
<p>Then I found an update to the Open iTerm Here script at <a title="http://www.danns.co.uk/node/226" href="http://www.danns.co.uk/node/226">http://www.danns.co.uk/node/226</a></p>
<p>This version successfully solves the issue of the two tabs. If you are a Terminal user, I imagine it should be easy to apply the patch to the Terminal Here script, or just use this script and have it invoke Terminal instead of iTerm.</p>
<p>Finally, to use the script  you then need to save it as an executable app. This is fairly straightforward:</p>
<ol>
<li>Open the Script Editor application</li>
<li>Past in the source</li>
<li>Save it</li>
<li>Then chose save as</li>
<li>Selected File Format of &#8220;Application&#8221;</li>
<li>Save it again</li>
</ol>
<p>You can now use QuickSilver or Silverlight to invoke the script.</p>
<p>However, I wanted to find out if I could add a button to Finder that could be clicked to run it. I eventually found out how to do this and here is how. You can simply drag the script .app file onto the top of the Finder application, and a button is created for it there.</p>
<p>So, when looking at a folder, just click the new button you created and a new iTerm is opened at the current path.</p>
<p>Lastly, I wanted to change the icon from the default. I wanted to use the iTerm icon. To do this, follow these steps to copy and paste the icon from the iTerm application:</p>
<ol>
<li>Go to Applications</li>
<li>Navigate to iTerm</li>
<li>Select the More Info&#8230; button</li>
<li>Find your iTermHere.app and do the same</li>
<li>Click the small icon at the top of the iTerm more info window and click cmd-c (apple-c, the shortcut to copy text)</li>
<li>Click the small icon at the top of the iTermHere.app more info window and paste! (apple-v)</li>
</ol>
<p>That&#8217;s it, you now have the script as an app, with a button in the Finder windows, and a nice iTerm icon.</p>
<p>Many thanks to all the folks involved in creating and refining these scripts I found, as linked to above.</p>
<p>Enjoy.</p>
Posted in TechIt  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cuasan.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cuasan.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cuasan.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cuasan.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cuasan.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cuasan.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cuasan.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cuasan.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cuasan.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cuasan.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=91&subd=cuasan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cuasan.wordpress.com/2009/08/19/mac-open-iterm-here/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f5b4f043baa2ee62e54da395d6aea29?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmom</media:title>
		</media:content>
	</item>
		<item>
		<title>Clearing the MySql Logs</title>
		<link>http://cuasan.wordpress.com/2009/08/19/clearing-the-mysql-logs/</link>
		<comments>http://cuasan.wordpress.com/2009/08/19/clearing-the-mysql-logs/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 12:30:53 +0000</pubDate>
		<dc:creator>dmom</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[TechIt]]></category>

		<guid isPermaLink="false">http://cuasan.wordpress.com/?p=90</guid>
		<description><![CDATA[mysql&#62; show master logs;
 
+------------------+------------+
&#124; Log_name         &#124; File_size  &#124;
+------------------+------------+
&#124; mysql-bin.000023 &#124; 1074039776 &#124;
&#124; mysql-bin.000024 &#124; 1023334365 &#124;
&#124; mysql-bin.000025 &#124; 1073742100 &#124;
&#124; mysql-bin.000026 &#124;    4254255    &#124;
&#124; mysql-bin.000027 &#124;        117        &#124;
&#124; mysql-bin.000028 &#124;        [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=90&subd=cuasan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><code>mysql&gt; <strong>show master logs;</strong></code></p>
<p><code> </code></p>
<p><code>+------------------+------------+<br />
| Log_name         | File_size  |<br />
+------------------+------------+<br />
| mysql-bin.000023 | 1074039776 |<br />
| mysql-bin.000024 | 1023334365 |<br />
| mysql-bin.000025 | 1073742100 |<br />
| mysql-bin.000026 |    4254255    |<br />
| mysql-bin.000027 |        117        |<br />
| mysql-bin.000028 |         98         |<br />
+------------------+------------+<br />
6 rows in set (0.00 sec)</p>
<p>mysql&gt; <strong>purge master logs to 'mysql-bin.000028';</strong><br />
Query OK, 0 rows affected (10.35 sec)</p>
<p>mysql&gt; show master logs;<br />
+------------------+-----------+<br />
| Log_name         | File_size |<br />
+------------------+-----------+<br />
| mysql-bin.000028 |        98        |<br />
+------------------+-----------+<br />
1 row in set (0.00 sec)</p>
<p></code></p>
<p><code>mysql&gt;</code></p>
Posted in Open Source, TechIt  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cuasan.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cuasan.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cuasan.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cuasan.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cuasan.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cuasan.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cuasan.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cuasan.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cuasan.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cuasan.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=90&subd=cuasan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cuasan.wordpress.com/2009/08/19/clearing-the-mysql-logs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f5b4f043baa2ee62e54da395d6aea29?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmom</media:title>
		</media:content>
	</item>
		<item>
		<title>On demand &#8220;Tailing&#8221; of a database log table: select the last x records</title>
		<link>http://cuasan.wordpress.com/2009/08/19/on-demand-tailing-of-a-database-log-table-select-the-last-x-records/</link>
		<comments>http://cuasan.wordpress.com/2009/08/19/on-demand-tailing-of-a-database-log-table-select-the-last-x-records/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 12:29:32 +0000</pubDate>
		<dc:creator>dmom</dc:creator>
				<category><![CDATA[TechIt]]></category>

		<guid isPermaLink="false">http://cuasan.wordpress.com/?p=86</guid>
		<description><![CDATA[Recently I had to monitor some data being output to a log table while an application was running.
The log table was quite large, and being written to constantly and also by portions of that system I wasn&#8217;t interested in.
So I only wanted to see the 10 or 20 most recent rows / records written.
There are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=86&subd=cuasan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently I had to monitor some data being output to a log table while an application was running.</p>
<p>The log table was quite large, and being written to constantly and also by portions of that system I wasn&#8217;t interested in.</p>
<p>So I only wanted to see the 10 or 20 most recent rows / records written.</p>
<p>There are quite a few ways to do this, but this is what I threw together. It assumes the ordering is based on an incrementing unique record id.</p>
<p><code>select count(*) into @rowcount from prodlog; select id, source_id, created_on, message from prodlog where id &gt; (@rowcount-20) order by id;</code></p>
<p>I put the latest count of records in the table into a temporary variable. I then use that figure, minus the number of rows I want to see, to offset into the data.</p>
<p>Note that if the count of rows and row ids don&#8217;t match (e.g. because you used truncate) the above method will fail.</p>
<p>In this case you may use:</p>
<p><code>select id into @last_id from prodlog order by id desc limit 1; select id, source_id, created_on, message from prodlog where id &gt; (@last_id-20) order by id; </code></p>
<p>This is still potential issues with this, for instance you may get less than you expected if there are gaps in the id sequence.</p>
<p>But it sufficed for my needs at the time <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
Posted in TechIt  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cuasan.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cuasan.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cuasan.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cuasan.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cuasan.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cuasan.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cuasan.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cuasan.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cuasan.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cuasan.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=86&subd=cuasan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cuasan.wordpress.com/2009/08/19/on-demand-tailing-of-a-database-log-table-select-the-last-x-records/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f5b4f043baa2ee62e54da395d6aea29?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmom</media:title>
		</media:content>
	</item>
		<item>
		<title>Hash/Pound/# character and links that don&#8217;t change the URL</title>
		<link>http://cuasan.wordpress.com/2009/08/18/hashpound-character-and-links-that-dont-change-the-url/</link>
		<comments>http://cuasan.wordpress.com/2009/08/18/hashpound-character-and-links-that-dont-change-the-url/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 20:42:28 +0000</pubDate>
		<dc:creator>dmom</dc:creator>
				<category><![CDATA[TechIt]]></category>

		<guid isPermaLink="false">http://cuasan.wordpress.com/?p=89</guid>
		<description><![CDATA[An interesting alternative to href="#thisgoesnowhere", which causes the insertion of the &#8220;#&#8221; character and any following characters (&#8220;thisgoesnowhere&#8221; in this silly example) to the end of the URL, is to use a null javascript link target.
href="javascript:void(0);"
In this case, your onclick or other events are treated as before, but your page URL hasn&#8217;t needlessly changed.
Posted in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=89&subd=cuasan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>An interesting alternative to <code>href="#thisgoesnowhere"</code>, which causes the insertion of the &#8220;#&#8221; character and any following characters (&#8220;thisgoesnowhere&#8221; in this silly example) to the end of the URL, is to use a null javascript link target.</p>
<p><code>href="javascript:void(0);"</code></p>
<p>In this case, your onclick or other events are treated as before, but your page URL hasn&#8217;t needlessly changed.</p>
Posted in TechIt  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cuasan.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cuasan.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cuasan.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cuasan.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cuasan.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cuasan.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cuasan.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cuasan.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cuasan.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cuasan.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=89&subd=cuasan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cuasan.wordpress.com/2009/08/18/hashpound-character-and-links-that-dont-change-the-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f5b4f043baa2ee62e54da395d6aea29?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmom</media:title>
		</media:content>
	</item>
		<item>
		<title>VNC server :   Fatal server error:   could not open default font &#8216;fixed&#8217;</title>
		<link>http://cuasan.wordpress.com/2009/08/18/vnc-server-fatal-server-error-could-not-open-default-font-fixed/</link>
		<comments>http://cuasan.wordpress.com/2009/08/18/vnc-server-fatal-server-error-could-not-open-default-font-fixed/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 20:26:06 +0000</pubDate>
		<dc:creator>dmom</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[TechIt]]></category>

		<guid isPermaLink="false">http://cuasan.wordpress.com/?p=88</guid>
		<description><![CDATA[Trying to run vnc-server recently on a debian system, I ran into the following issue:
cat .vnc/debian-dev\:1.log
14/08/09 14:40:01 Xvnc version 3.3.7 - built Dec 30 2006 12:50:35
14/08/09 14:40:01 Copyright (C) 2002-2003 RealVNC Ltd.
14/08/09 14:40:01 Copyright (C) 1994-2000 AT&#38;T Laboratories Cambridge.
14/08/09 14:40:01 All Rights Reserved.
14/08/09 14:40:01 See http://www.realvnc.com for information on VNC
14/08/09 14:40:01 Desktop name 'X' (debian-dev:1)
14/08/09 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=88&subd=cuasan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Trying to run <strong>vnc-server</strong> recently on a debian system, I ran into the following issue:</p>
<p><code>cat .vnc/debian-dev\:1.log<br />
14/08/09 14:40:01 Xvnc version 3.3.7 - built Dec 30 2006 12:50:35<br />
14/08/09 14:40:01 Copyright (C) 2002-2003 RealVNC Ltd.<br />
14/08/09 14:40:01 Copyright (C) 1994-2000 AT&amp;T Laboratories Cambridge.<br />
14/08/09 14:40:01 All Rights Reserved.<br />
14/08/09 14:40:01 See http://www.realvnc.com for information on VNC<br />
14/08/09 14:40:01 Desktop name 'X' (debian-dev:1)<br />
14/08/09 14:40:01 Protocol version supported 3.3<br />
14/08/09 14:40:01 Listening for VNC connections on TCP port 5901<br />
Font directory '/usr/share/fonts/truetype/' not found - ignoring</code></p>
<p><code> </code></p>
<p><code>Fatal server error:<br />
could not open default font 'fixed'<br />
</code></p>
<p>I solved the issue with some apt-get for dependancies as per below</p>
<p><code>apt-get install xutils xbase-clients  xfonts-base  xfonts-75dpi  xfonts-100dpi</code></p>
<p>Ref: <a href="http://www.debianhelp.org/node/5720"> http://www.debianhelp.org/node/5720</a></p>
Posted in Open Source, TechIt  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cuasan.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cuasan.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cuasan.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cuasan.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cuasan.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cuasan.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cuasan.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cuasan.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cuasan.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cuasan.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=88&subd=cuasan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cuasan.wordpress.com/2009/08/18/vnc-server-fatal-server-error-could-not-open-default-font-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f5b4f043baa2ee62e54da395d6aea29?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmom</media:title>
		</media:content>
	</item>
		<item>
		<title>QuickSilver-esque shortcuts application on Ubuntu Debian GNU/Linux</title>
		<link>http://cuasan.wordpress.com/2008/10/06/quicksilver-esque-shortcuts-application-on-ubuntu-debian-gnulinux/</link>
		<comments>http://cuasan.wordpress.com/2008/10/06/quicksilver-esque-shortcuts-application-on-ubuntu-debian-gnulinux/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 22:25:09 +0000</pubDate>
		<dc:creator>dmom</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://cuasan.wordpress.com/2008/10/06/quicksilver-esque-shortcuts-application-on-ubuntu-debian-gnulinux/</guid>
		<description><![CDATA[Some of my colleagues have Apple Macs and use an application called &#8216;Quick Silver&#8217; for managing frequently use application/scripts/text files/notes/ims/etc.
I was impressed with what one could do with it and began looking for something similar on Ubuntu.
There is a clone for Gnome called Gnome-Do [ http://www.gnomedo.com ] that lives up to the task pretty well [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=79&subd=cuasan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some of my colleagues have Apple Macs and use an application called &#8216;Quick Silver&#8217; for managing frequently use application/scripts/text files/notes/ims/etc.</p>
<p>I was impressed with what one could do with it and began looking for something similar on Ubuntu.</p>
<p>There is a clone for Gnome called Gnome-Do [ <a href="http://www.gnomedo.com">http://www.gnomedo.com</a> ] that lives up to the task pretty well from what I can gather so-far. There are some good updates in the &#8216;Intrepid Ibex&#8217; release (8.10) that are not in the &#8216;Hardy Heron&#8217; release (8.04), such as a more complete and useful preferences menu, more plugins and managing them individually through the applications preferences.</p>
<p>Try it out, after installing gnome-do, you need to set it up to launch at gnome login (easily done via the preferences in the intrepid version). Then you can invoke it with the SUPER+SPACEBAR short-cut.</p>
Posted in Open Source Tagged: tips <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cuasan.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cuasan.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cuasan.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cuasan.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cuasan.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cuasan.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cuasan.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cuasan.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cuasan.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cuasan.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=79&subd=cuasan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cuasan.wordpress.com/2008/10/06/quicksilver-esque-shortcuts-application-on-ubuntu-debian-gnulinux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f5b4f043baa2ee62e54da395d6aea29?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmom</media:title>
		</media:content>
	</item>
		<item>
		<title>Using MySql with Jahia on Debian GNU/Linux</title>
		<link>http://cuasan.wordpress.com/2008/10/06/using-mysql-with-jahia-on-debian-gnulinux/</link>
		<comments>http://cuasan.wordpress.com/2008/10/06/using-mysql-with-jahia-on-debian-gnulinux/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 21:27:00 +0000</pubDate>
		<dc:creator>dmom</dc:creator>
				<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://cuasan.wordpress.com/2008/10/06/using-mysql-with-jahia-on-debian-gnulinux/</guid>
		<description><![CDATA[After installing Jahia today, I wanted to use the MySql database instead of the default HyperSonic. I am currently using MySql for other purposes and want to have a look at accessing the Jahia database to re-use content.
Initially when I created the &#8216;jahia&#8217; database in mysql and granted permissions to the Jahia user, Jahia reported:
"This [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=64&subd=cuasan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After installing Jahia today, I wanted to use the MySql database instead of the default HyperSonic. I am currently using MySql for other purposes and want to have a look at accessing the Jahia database to re-use content.</p>
<p>Initially when I created the &#8216;jahia&#8217; database in mysql and granted permissions to the Jahia user, Jahia reported:</p>
<blockquote><p><code>"This database doesn't seem to support extended charsets."</code></p></blockquote>
<p>Dropping the database and recreating it with a unicode dataset sorts this little niggle out.</p>
<blockquote><p><code>mysql&gt; create database jahia character set = utf8;</code></p></blockquote>
Posted in Open Source  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cuasan.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cuasan.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cuasan.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cuasan.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cuasan.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cuasan.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cuasan.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cuasan.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cuasan.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cuasan.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cuasan.wordpress.com&blog=837431&post=64&subd=cuasan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cuasan.wordpress.com/2008/10/06/using-mysql-with-jahia-on-debian-gnulinux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f5b4f043baa2ee62e54da395d6aea29?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmom</media:title>
		</media:content>
	</item>
	</channel>
</rss>