<?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>Fernandez de Quilon</title>
	<atom:link href="http://www.jefferyfernandez.id.au/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jefferyfernandez.id.au</link>
	<description>between flat screens and grey matter</description>
	<lastBuildDate>Thu, 04 Aug 2011 23:01:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3-aortic-dissection</generator>
		<item>
		<title>Trigger build of Debian package for Git Jenkins CI</title>
		<link>http://www.jefferyfernandez.id.au/2011/08/05/trigger-build-of-debian-package-for-git-jenkins-ci/</link>
		<comments>http://www.jefferyfernandez.id.au/2011/08/05/trigger-build-of-debian-package-for-git-jenkins-ci/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 23:01:20 +0000</pubDate>
		<dc:creator>Jeffery</dc:creator>
				<category><![CDATA[BASh]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Packaging]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.jefferyfernandez.id.au/?p=163</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div id="gist-1093983" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'>#!/bin/bash</div><div class='line' id='LC2'># </div><div class='line' id='LC3'># This is a helper script to trigger the build of a debian package for a</div><div class='line' id='LC4'># project which is in Git SCM and integrated via Jenkins CI</div><div class='line' id='LC5'>#</div><div class='line' id='LC6'># The trigger used for the package build is a string &quot;bump for release&quot;</div><div class='line' id='LC7'># which is part of the commit message for the Git repository.</div><div class='line' id='LC8'>#</div><div class='line' id='LC9'># The Changelog is then parsed to obtain the release version and then</div><div class='line' id='LC10'># the repository is exported for package building</div><div class='line' id='LC11'>#</div><div class='line' id='LC12'># Author: Jeffery Fernandez &lt;jeffery@fernandez.net.au&gt;</div><div class='line' id='LC13'>#</div><div class='line' id='LC14'># Requires the following Debian packages:</div><div class='line' id='LC15'># dpkg-dev debhelper devscripts fakeroot lintian</div><div class='line' id='LC16'>##</div><div class='line' id='LC17'><br/></div><div class='line' id='LC18'># Extract the last changelog and discard unwanted data</div><div class='line' id='LC19'>RELEASE_BUMP=`git log --max-count=1 --pretty -- . | grep -v &quot;^Author: &quot; | grep -v &quot;^Date: &quot; | grep -v &quot;^Merge: &quot; | grep -v &quot;^commit&quot;`</div><div class='line' id='LC20'><br/></div><div class='line' id='LC21'># Very if a release was requested</div><div class='line' id='LC22'>echo $RELEASE_BUMP | grep -i &quot;bump for release&quot; &gt; /dev/null</div><div class='line' id='LC23'>if [ $? -eq 1 ]</div><div class='line' id='LC24'>then</div><div class='line' id='LC25'>	echo &quot;Release request not Found&quot; &amp;&amp; exit 0;</div><div class='line' id='LC26'>fi</div><div class='line' id='LC27'><br/></div><div class='line' id='LC28'># Make sure we have a Job name ( Comes from Jenkins CI)</div><div class='line' id='LC29'>if [ -z &quot;$JOB_NAME&quot; ]</div><div class='line' id='LC30'>then</div><div class='line' id='LC31'>	echo &quot;Job Name not provided&quot; &amp;&amp; exit 1;</div><div class='line' id='LC32'>fi</div><div class='line' id='LC33'><br/></div><div class='line' id='LC34'># The PWD needs to be the parent to the debian folder inorder to extract the Version to package</div><div class='line' id='LC35'>VERSION=`dpkg-parsechangelog | awk &#39;/^Version/ {print $2}&#39;`</div><div class='line' id='LC36'><br/></div><div class='line' id='LC37'># Path for building the Debian Package</div><div class='line' id='LC38'>PACKAGE_PATH=&quot;${JOB_NAME}-${VERSION}&quot;</div><div class='line' id='LC39'><br/></div><div class='line' id='LC40'># Obtain the last Git Revision Hash</div><div class='line' id='LC41'>HASH=`git rev-parse HEAD`</div><div class='line' id='LC42'><br/></div><div class='line' id='LC43'>echo &quot;Building: ${VERSION} from Commit: ${HASH}&quot;</div><div class='line' id='LC44'><br/></div><div class='line' id='LC45'># Clean up old Build path, if it exists</div><div class='line' id='LC46'>if [ -d &quot;${PACKAGE_PATH}&quot; ]</div><div class='line' id='LC47'>then</div><div class='line' id='LC48'>	rm -fR &quot;${PACKAGE_PATH}&quot;</div><div class='line' id='LC49'>fi</div><div class='line' id='LC50'><br/></div><div class='line' id='LC51'>#  Make sure the Exporting directory exists</div><div class='line' id='LC52'>mkdir -p &quot;${PACKAGE_PATH}&quot;</div><div class='line' id='LC53'><br/></div><div class='line' id='LC54'># Export the revision and Unarchive it into a build folder</div><div class='line' id='LC55'>git archive ${HASH} | ( cd &quot;${PACKAGE_PATH}&quot; &amp;&amp; tar -xf - ) || { </div><div class='line' id='LC56'>	echo &quot;Exporting Git Repository Failed&quot;; exit 1; </div><div class='line' id='LC57'>}</div><div class='line' id='LC58'><br/></div><div class='line' id='LC59'># Remove any Build Config file, as we don&#39;t want to run tests anymore</div><div class='line' id='LC60'>if [ -f &quot;${PACKAGE_PATH}/build.xml&quot; ] </div><div class='line' id='LC61'>then </div><div class='line' id='LC62'>	rm &quot;${PACKAGE_PATH}/build.xml&quot;</div><div class='line' id='LC63'>fi</div><div class='line' id='LC64'><br/></div><div class='line' id='LC65'># Build Package</div><div class='line' id='LC66'>cd &quot;${PACKAGE_PATH}&quot; &amp;&amp; debuild -i -us -uc</div><div class='line' id='LC67'><br/></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1093983/2a455280b6ea7b2ea068c103e976deeb81ae362e/Debianize-Git-Jenkins" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1093983#file_debianize_git_jenkins" style="float:right;margin-right:10px;color:#666">Debianize-Git-Jenkins</a>
            <a href="https://gist.github.com/1093983">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.jefferyfernandez.id.au/2011/08/05/trigger-build-of-debian-package-for-git-jenkins-ci/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update Timestamp of files in Checked-out Git Repository</title>
		<link>http://www.jefferyfernandez.id.au/2011/07/30/update-timestamp-of-files-in-checked-out-git-repository/</link>
		<comments>http://www.jefferyfernandez.id.au/2011/07/30/update-timestamp-of-files-in-checked-out-git-repository/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 13:45:13 +0000</pubDate>
		<dc:creator>Jeffery</dc:creator>
				<category><![CDATA[BASh]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[SCM]]></category>

		<guid isPermaLink="false">http://www.jefferyfernandez.id.au/?p=155</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div id="gist-1115504" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c">#!/bin/bash -e</span></div><div class='line' id='LC2'><span class="c">####</span></div><div class='line' id='LC3'><span class="c"># Helper script to update the Last modified timestamp of files in a Git SCM</span></div><div class='line' id='LC4'><span class="c"># Projects working Copy</span></div><div class='line' id='LC5'><span class="c">#</span></div><div class='line' id='LC6'><span class="c"># When you clone a Git repository, it sets the timestamp of all the files to the</span></div><div class='line' id='LC7'><span class="c"># time when you cloned the repository.</span></div><div class='line' id='LC8'><span class="c">#</span></div><div class='line' id='LC9'><span class="c"># This becomes a problem when you want the cloned repository, which is part of a </span></div><div class='line' id='LC10'><span class="c"># Web application have a proper cacheing mechanism so that it can re-cache files</span></div><div class='line' id='LC11'><span class="c"># (into a webtree) that have been modified since the last cache.</span></div><div class='line' id='LC12'><span class="c">#</span></div><div class='line' id='LC13'><span class="c"># @see http://stackoverflow.com/questions/1964470/whats-the-equivalent-of-use-commit-times-for-git</span></div><div class='line' id='LC14'><span class="c">#</span></div><div class='line' id='LC15'><span class="c"># Author: Jeffery Fernandez &lt;jeffery@fernandez.net.au&gt;</span></div><div class='line' id='LC16'><span class="c">####</span></div><div class='line' id='LC17'><br/></div><div class='line' id='LC18'><span class="c"># Make sure we are not running this on a bare Repository</span></div><div class='line' id='LC19'><span class="nv">REPO_TYPE</span><span class="o">=</span><span class="sb">`</span>git config --list|egrep ^core.bare | awk -F <span class="s1">&#39;=&#39;</span> <span class="s1">&#39;{ print $2 }&#39;</span><span class="sb">`</span></div><div class='line' id='LC20'><span class="k">if</span> <span class="o">[</span> <span class="s2">&quot;$REPO_TYPE&quot;</span> <span class="o">==</span> <span class="s2">&quot;true&quot;</span> <span class="o">]</span></div><div class='line' id='LC21'><span class="k">then</span></div><div class='line' id='LC22'><span class="k">	</span><span class="nb">echo</span> <span class="s2">&quot;Cannot run this script on a bare Repository&quot;</span> <span class="o">&amp;&amp;</span> <span class="nb">exit </span>1</div><div class='line' id='LC23'><span class="k">fi</span></div><div class='line' id='LC24'><br/></div><div class='line' id='LC25'><span class="nb">echo</span> <span class="s2">&quot;Updating Git Repository Last Modified Time-stamp&quot;</span></div><div class='line' id='LC26'><br/></div><div class='line' id='LC27'><span class="c"># Obtain the Operating System</span></div><div class='line' id='LC28'><span class="nv">OS</span><span class="o">=</span><span class="k">${</span><span class="nv">OS</span><span class="k">:-</span><span class="sb">`</span>uname<span class="sb">`</span><span class="k">}</span></div><div class='line' id='LC29'><br/></div><div class='line' id='LC30'><span class="c"># Get the last revision hash of a particular file in the git repository</span></div><div class='line' id='LC31'>getFileLastRevision<span class="o">()</span> </div><div class='line' id='LC32'><span class="o">{</span></div><div class='line' id='LC33'>	git rev-list HEAD <span class="s2">&quot;$1&quot;</span> | head -n 1</div><div class='line' id='LC34'><span class="o">}</span></div><div class='line' id='LC35'><br/></div><div class='line' id='LC36'><span class="c"># Extract the actual last modified timestamp of the file and Update the time-stamp</span></div><div class='line' id='LC37'>updateFileTimeStamp<span class="o">()</span> </div><div class='line' id='LC38'><span class="o">{</span></div><div class='line' id='LC39'>	<span class="c"># Extract the file revision</span></div><div class='line' id='LC40'>	<span class="nv">FILE_REVISION_HASH</span><span class="o">=</span><span class="sb">`</span>getFileLastRevision <span class="s2">&quot;$1&quot;</span><span class="sb">`</span></div><div class='line' id='LC41'><br/></div><div class='line' id='LC42'>	<span class="c"># Get the File last modified time</span></div><div class='line' id='LC43'>	<span class="nv">FILE_MODIFIED_TIME</span><span class="o">=</span><span class="sb">`</span>git show --pretty<span class="o">=</span>format:%ai --abbrev-commit <span class="k">${</span><span class="nv">FILE_REVISION_HASH</span><span class="k">}</span> | head -n 1<span class="sb">`</span></div><div class='line' id='LC44'><br/></div><div class='line' id='LC45'>	<span class="c"># Extract the last modified timestamp, differently for Linux, FreeBSD and Mac OS X</span></div><div class='line' id='LC46'>	<span class="k">if</span> <span class="o">[</span> <span class="s2">&quot;$OS&quot;</span> <span class="o">=</span> <span class="s1">&#39;Linux&#39;</span> <span class="o">]</span></div><div class='line' id='LC47'>	<span class="k">then</span></div><div class='line' id='LC48'>		<span class="c"># for displaying the date in readable format</span></div><div class='line' id='LC49'>		<span class="c">#FORMATTED_TIMESTAMP=`date --date=&quot;${FILE_MODIFIED_TIME}&quot; +&#39;%d-%m-%Y %H:%M:%S %z&#39;`</span></div><div class='line' id='LC50'>		<span class="c">#echo &quot;Modified: ${FILE_MODIFIED_TIME} | ${FORMATTED_TIMESTAMP} &gt; ${1}&quot;</span></div><div class='line' id='LC51'><br/></div><div class='line' id='LC52'>		<span class="c"># Modify the last modified timestamp</span></div><div class='line' id='LC53'>		touch -d <span class="s2">&quot;${FILE_MODIFIED_TIME}&quot;</span> <span class="nv">$2</span></div><div class='line' id='LC54'><br/></div><div class='line' id='LC55'>	<span class="k">elif</span> <span class="o">[</span> <span class="s2">&quot;$OS&quot;</span> <span class="o">=</span> <span class="s1">&#39;Darwin&#39;</span> <span class="o">]</span> <span class="o">||</span> <span class="o">[</span> <span class="s2">&quot;$OS&quot;</span> <span class="o">=</span> <span class="s1">&#39;FreeBSD&#39;</span> <span class="o">]</span></div><div class='line' id='LC56'>	<span class="k">then</span></div><div class='line' id='LC57'>		<span class="c"># Format the date for updating the timestamp</span></div><div class='line' id='LC58'>		<span class="nv">FORMATTED_TIMESTAMP</span><span class="o">=</span><span class="sb">`</span>date -j -f <span class="s1">&#39;%Y-%m-%d %H:%M:%S %z&#39;</span> <span class="s2">&quot;${FILE_MODIFIED_TIME}&quot;</span> +<span class="s1">&#39;%Y%m%d%H%M.%S&#39;</span><span class="sb">`</span></div><div class='line' id='LC59'>		<span class="c">#echo &quot;Modified: ${FILE_MODIFIED_TIME} | ${FORMATTED_TIMESTAMP} &gt; ${1}&quot;</span></div><div class='line' id='LC60'><br/></div><div class='line' id='LC61'>		<span class="c"># Modify the last modified timestamp</span></div><div class='line' id='LC62'>		touch -t  <span class="s2">&quot;${FORMATTED_TIMESTAMP}&quot;</span> <span class="nv">$2</span></div><div class='line' id='LC63'>	<span class="k">else</span></div><div class='line' id='LC64'><span class="k">		</span><span class="nb">echo</span> <span class="s2">&quot;Unknown Operating System to perform timestamp update&quot;</span> &gt;&amp;2</div><div class='line' id='LC65'>		<span class="nb">exit </span>1</div><div class='line' id='LC66'>	<span class="k">fi</span></div><div class='line' id='LC67'><span class="o">}</span></div><div class='line' id='LC68'><br/></div><div class='line' id='LC69'><span class="c"># Backup and update the &quot;Internal Field Separator&quot; to a newline. This is so that</span></div><div class='line' id='LC70'><span class="c"># we can deal with spaces in file names in the for loop below</span></div><div class='line' id='LC71'><span class="nv">IFS_BAK</span><span class="o">=</span><span class="nv">$IFS</span></div><div class='line' id='LC72'><span class="nv">IFS</span><span class="o">=</span><span class="s2">&quot;</span></div><div class='line' id='LC73'><span class="s2">&quot;</span></div><div class='line' id='LC74'><span class="c"># Loop through and fix timestamps on all files in our checked-out repository</span></div><div class='line' id='LC75'><span class="k">for </span>file in <span class="k">$(</span>git ls-files<span class="k">)</span></div><div class='line' id='LC76'><span class="k">do</span></div><div class='line' id='LC77'><span class="k">	</span>updateFileTimeStamp <span class="s2">&quot;${file}&quot;</span> <span class="s2">&quot;${file}&quot;</span></div><div class='line' id='LC78'><span class="k">done</span></div><div class='line' id='LC79'><br/></div><div class='line' id='LC80'><span class="c"># Revert the default delimiter</span></div><div class='line' id='LC81'><span class="nv">IFS</span><span class="o">=</span><span class="nv">$IFS_BAK</span></div><div class='line' id='LC82'><span class="nv">IFS_BAK</span><span class="o">=</span></div><div class='line' id='LC83'><br/></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1115504/f51e8ff42ae90bb72f6b5d498ec9d98cd3cc81c1/GitRepoUpdateTimestamp.sh" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1115504#file_git_repo_update_timestamp.sh" style="float:right;margin-right:10px;color:#666">GitRepoUpdateTimestamp.sh</a>
            <a href="https://gist.github.com/1115504">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.jefferyfernandez.id.au/2011/07/30/update-timestamp-of-files-in-checked-out-git-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change Linux User login and Group</title>
		<link>http://www.jefferyfernandez.id.au/2010/10/06/change-linux-user-login-and-group/</link>
		<comments>http://www.jefferyfernandez.id.au/2010/10/06/change-linux-user-login-and-group/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 05:17:09 +0000</pubDate>
		<dc:creator>Jeffery</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[group]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://www.jefferyfernandez.id.au/?p=128</guid>
		<description><![CDATA[If you ever have the need to change a linux user&#8217;s login and home directory, here is a quick tip: To change the users home directory, execute the following: usermod -l &#60;newname&#62; -d /home/&#60;newname&#62; -m &#60;oldname&#62; And to change the &#8230; <a href="http://www.jefferyfernandez.id.au/2010/10/06/change-linux-user-login-and-group/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you ever have the need to change a linux user&#8217;s login and home directory, here is a quick tip:</p>
<p>To change the users home directory, execute the following:</p>
<pre class="rootcommand">usermod -l &lt;newname&gt; -d /home/&lt;newname&gt; -m &lt;oldname&gt;</pre>
<p>And to change the group of the user, execute the following.</p>
<pre class="rootcommand">groupmod -n &lt;newgroup&gt; &lt;oldgroup&gt;</pre>
<p>Just make sure you are logged in as a different user before executing the same. You can either login as root user or create an other user with sudo privileges to execute the commands.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jefferyfernandez.id.au/2010/10/06/change-linux-user-login-and-group/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Zend Debugger: Cannot read a valid value of zend_debugger.httpd_uid</title>
		<link>http://www.jefferyfernandez.id.au/2010/08/28/zend-debugger-cannot-read-a-valid-value-of-zend_debugger-httpd_uid/</link>
		<comments>http://www.jefferyfernandez.id.au/2010/08/28/zend-debugger-cannot-read-a-valid-value-of-zend_debugger-httpd_uid/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 04:27:08 +0000</pubDate>
		<dc:creator>Jeffery</dc:creator>
				<category><![CDATA[Debugger]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.jefferyfernandez.id.au/?p=117</guid>
		<description><![CDATA[If you happen to have setup Zend Debugger for debugging your PHP code and you encounter the following error in the webserver error log: Zend Debugger: Cannot read a valid value of zend_debugger.httpd_uid or zend.httpd_uid, will not perform dropping of &#8230; <a href="http://www.jefferyfernandez.id.au/2010/08/28/zend-debugger-cannot-read-a-valid-value-of-zend_debugger-httpd_uid/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you happen to have setup Zend Debugger for debugging your PHP code and you encounter the following error in the webserver error log:</p>
<blockquote><p>Zend Debugger: Cannot read a valid value of zend_debugger.httpd_uid or zend.httpd_uid, will not perform dropping of privileges</p></blockquote>
<p>then your setup will fail when you try to debug over a tunnel. This is caused by the debugger not being aware of the uid of the process which runs the web server.</p>
<p>To fix this, we need to find the user ID of the httpd process that runs the Zend Debugger. One way of finding the UID is by opening up the /etc/passwd file. You should see something similar to:</p>
<p><code>_www:*:70:70:World Wide Web Server:/Library/WebServer:/usr/bin/false</code></p>
<p>Now to fix the problem, we update the zend config in the php.ini file and restart the webserver. Here is my complete zend debugger configuration:</p>
<p><code>[zend]<br />
zend_extension=/opt/local/lib/php/extensions/no-debug-non-zts-20090626/ZendDebugger.so<br />
zend_debugger.allow_hosts=127.0.0.1,10.1.1.2,10.1.1.3,10.0.1.149,10.0.1.123,10.0.1.124<br />
zend_debugger.expose_remotely=always<br />
zend_debugger.httpd_uid=70</code></p>
<p>Now for some real debugging <img src='http://www.jefferyfernandez.id.au/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jefferyfernandez.id.au/2010/08/28/zend-debugger-cannot-read-a-valid-value-of-zend_debugger-httpd_uid/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Install PDT for Adobe Flash Builder</title>
		<link>http://www.jefferyfernandez.id.au/2010/08/23/install-pdt-for-adobe-flash-builder/</link>
		<comments>http://www.jefferyfernandez.id.au/2010/08/23/install-pdt-for-adobe-flash-builder/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 23:16:04 +0000</pubDate>
		<dc:creator>Jeffery</dc:creator>
				<category><![CDATA[Adobe Flash Builder]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.jefferyfernandez.id.au/?p=99</guid>
		<description><![CDATA[I have come across several people trying to do this in a convoluted way. Here is the simple way of adding PDT to your Flash Builder IDE. Since current Flash Builder is basically built on Eclipse Galileo, you just have &#8230; <a href="http://www.jefferyfernandez.id.au/2010/08/23/install-pdt-for-adobe-flash-builder/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have come across several people trying to do this in a convoluted way. Here is the simple way of adding PDT to your Flash Builder IDE.</p>
<p>Since current Flash Builder is basically built on Eclipse Galileo, you just have to add the update site for Galileo</p>
<p>In Flash Builder, go to<br />
Help &gt; Install New Software</p>
<p>Click on &#8220;Available Software Sites&#8221; link, which should open up &#8220;Available Software Sites&#8221; window. If you don&#8217;t have the Galileo update site already configured, add a new Software site. Call it &#8220;Eclipse 3.5 updates&#8221; and add the URL: http://download.eclipse.org/releases/galileo/</p>
<p>Back in the &#8220;Available Software&#8221; screen, select &#8220;All available sites&#8221; for the &#8220;Work with&#8221; section. In the search input below that, type in PDT and you should see PDT as an item on the search result. Select it and click the next button. Eclipse will now prompt you with a review screen of the packages which are going to be installed. Click next and complete the installation. You may have to restart the IDE for the changed to take affect.</p>
<p>Shown below is the review screen of PDT installation.</p>
<div id="attachment_111" class="wp-caption alignnone" style="width: 880px"><img class="size-full wp-image-111" title="PDT Installation for Flash Builder" src="http://www.jefferyfernandez.id.au/wp-content/uploads/2010/08/PDT-Installation.jpeg" alt="PDT Installation for Flash Builder" width="870" height="761" /><p class="wp-caption-text">PDT Installation for Flash Builder</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jefferyfernandez.id.au/2010/08/23/install-pdt-for-adobe-flash-builder/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Return to Blogging</title>
		<link>http://www.jefferyfernandez.id.au/2010/08/23/return-to-blogging/</link>
		<comments>http://www.jefferyfernandez.id.au/2010/08/23/return-to-blogging/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 22:44:24 +0000</pubDate>
		<dc:creator>Jeffery</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.jefferyfernandez.id.au/?p=88</guid>
		<description><![CDATA[Yes, I am back! After a long absence of over 2 years I hope to blog again. Lots of things have happened since the last time I wrote an entry. Life has changed ever since I became a father around &#8230; <a href="http://www.jefferyfernandez.id.au/2010/08/23/return-to-blogging/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yes, I am back! After a long absence of over 2 years I hope to blog again. Lots of things have happened since the last time I wrote an entry. Life has changed ever since I became a father around 2 years ago. My son Denzel will be 2 years old in September and it has been a hectic but enjoyable journey so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jefferyfernandez.id.au/2010/08/23/return-to-blogging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Date Age Calculation</title>
		<link>http://www.jefferyfernandez.id.au/2008/07/02/mysql-date-age-calculation/</link>
		<comments>http://www.jefferyfernandez.id.au/2008/07/02/mysql-date-age-calculation/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 09:03:03 +0000</pubDate>
		<dc:creator>Jeffery</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[stored routines]]></category>

		<guid isPermaLink="false">http://www.jefferyfernandez.id.au/?p=76</guid>
		<description><![CDATA[I have always had the need to calculate the age as year and month from a MySQL field of type date. No doubt you can achieve this with a bit of PHP, but when you require to do the conversion &#8230; <a href="http://www.jefferyfernandez.id.au/2008/07/02/mysql-date-age-calculation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have always had the need to calculate the age as year and month from a MySQL field of type date. No doubt you can achieve this with a bit of PHP, but when you require to do the conversion right from MySQL, you can only go as far as getting the age in &#8220;years&#8221;.</p>
<p>I have used here a MySQL stored routine to achive this:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;">DELIMITER $$
<span style="color: #990099; font-weight: bold;">DROP</span> <span style="color: #990099; font-weight: bold;">FUNCTION</span> <span style="color: #009900;">IF</span> <span style="color: #990099; font-weight: bold;">EXISTS</span> <span style="color: #008000;">`my<span style="color: #008080; font-weight: bold;">_</span>database`</span>.<span style="color: #008000;">`getage`</span> $$
<span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">DEFINER</span><span style="color: #CC0099;">=</span><span style="color: #008000;">`root`</span>@<span style="color: #008000;">`localhost`</span> <span style="color: #990099; font-weight: bold;">FUNCTION</span> <span style="color: #008000;">`getage`</span><span style="color: #FF00FF;">&#40;</span>pdate <span style="color: #999900; font-weight: bold;">DATE</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">RETURNS</span> <span style="color: #000099;">char</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">30</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">DETERMINISTIC</span>
<span style="color: #990099; font-weight: bold;">BEGIN</span>
<span style="color: #990099; font-weight: bold;">DECLARE</span> years <span style="color: #999900; font-weight: bold;">INT</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">DECLARE</span> months <span style="color: #999900; font-weight: bold;">INT</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">DECLARE</span> days <span style="color: #999900; font-weight: bold;">INT</span><span style="color: #000033;">;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">DECLARE</span> current_year <span style="color: #999900; font-weight: bold;">INT</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">DECLARE</span> current_month <span style="color: #999900; font-weight: bold;">INT</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">DECLARE</span> current_day <span style="color: #999900; font-weight: bold;">INT</span><span style="color: #000033;">;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">DECLARE</span> year_diff <span style="color: #999900; font-weight: bold;">INT</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">DECLARE</span> month_diff <span style="color: #999900; font-weight: bold;">INT</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">DECLARE</span> day_diff <span style="color: #999900; font-weight: bold;">INT</span><span style="color: #000033;">;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">DECLARE</span> yearstring <span style="color: #000099;">CHAR</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">6</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">DECLARE</span> monthstring <span style="color: #000099;">CHAR</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">7</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #000099;">YEAR</span><span style="color: #FF00FF;">&#40;</span>pdate<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">INTO</span> years<span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #000099;">MONTH</span><span style="color: #FF00FF;">&#40;</span>pdate<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">INTO</span> months<span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #000099;">DAY</span><span style="color: #FF00FF;">&#40;</span>pdate<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">INTO</span> days<span style="color: #000033;">;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #000099;">YEAR</span><span style="color: #FF00FF;">&#40;</span><span style="color: #000099;">CURRENT_DATE</span><span style="color: #FF00FF;">&#40;</span><span style="color: #FF00FF;">&#41;</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">INTO</span> current_year<span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #000099;">MONTH</span><span style="color: #FF00FF;">&#40;</span><span style="color: #000099;">CURRENT_DATE</span><span style="color: #FF00FF;">&#40;</span><span style="color: #FF00FF;">&#41;</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">INTO</span> current_month<span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #000099;">DAY</span><span style="color: #FF00FF;">&#40;</span><span style="color: #000099;">CURRENT_DATE</span><span style="color: #FF00FF;">&#40;</span><span style="color: #FF00FF;">&#41;</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">INTO</span> current_day<span style="color: #000033;">;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #FF00FF;">&#40;</span>current_year <span style="color: #CC0099;">-</span> years<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">INTO</span> year_diff<span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #FF00FF;">&#40;</span>current_month <span style="color: #CC0099;">-</span> months<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">INTO</span> month_diff<span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #FF00FF;">&#40;</span>current_day <span style="color: #CC0099;">-</span> days<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">INTO</span> day_diff<span style="color: #000033;">;</span>
&nbsp;
<span style="color: #009900;">if</span> <span style="color: #FF00FF;">&#40;</span>current_month <span style="color: #CC0099;">&amp;</span>lt<span style="color: #000033;">;</span> months<span style="color: #FF00FF;">&#41;</span> <span style="color: #009900;">THEN</span>
	<span style="color: #990099; font-weight: bold;">SET</span> month_diff <span style="color: #CC0099;">=</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #FF00FF;">&#40;</span><span style="color: #FF00FF;">&#40;</span>months <span style="color: #CC0099;">-</span> <span style="color: #008080;">12</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099;">*</span> <span style="color: #CC0099;">-</span><span style="color: #008080;">1</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099;">+</span> current_month<span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span>
	<span style="color: #990099; font-weight: bold;">SET</span> year_diff <span style="color: #CC0099;">=</span> <span style="color: #FF00FF;">&#40;</span>year_diff <span style="color: #CC0099;">-</span> <span style="color: #008080;">1</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span>
<span style="color: #009900;">END</span> <span style="color: #009900;">IF</span><span style="color: #000033;">;</span>
&nbsp;
<span style="color: #009900;">if</span> <span style="color: #FF00FF;">&#40;</span> month_diff <span style="color: #CC0099;">=</span> <span style="color: #008080;">1</span> <span style="color: #FF00FF;">&#41;</span> <span style="color: #009900;">THEN</span>
	<span style="color: #990099; font-weight: bold;">SET</span> monthstring <span style="color: #CC0099;">=</span> <span style="color: #008000;">&quot;month&quot;</span><span style="color: #000033;">;</span>
<span style="color: #009900;">ELSE</span>
	<span style="color: #990099; font-weight: bold;">SET</span> monthstring <span style="color: #CC0099;">=</span> <span style="color: #008000;">&quot;months&quot;</span><span style="color: #000033;">;</span>
<span style="color: #009900;">END</span> <span style="color: #009900;">IF</span><span style="color: #000033;">;</span>
&nbsp;
<span style="color: #009900;">if</span> <span style="color: #FF00FF;">&#40;</span> year_diff <span style="color: #CC0099;">=</span> <span style="color: #008080;">1</span> <span style="color: #FF00FF;">&#41;</span> <span style="color: #009900;">THEN</span>
	<span style="color: #990099; font-weight: bold;">SET</span> yearstring <span style="color: #CC0099;">=</span> <span style="color: #008000;">&quot;year&quot;</span><span style="color: #000033;">;</span>
<span style="color: #009900;">ELSE</span>
	<span style="color: #990099; font-weight: bold;">SET</span> yearstring <span style="color: #CC0099;">=</span> <span style="color: #008000;">&quot;years&quot;</span><span style="color: #000033;">;</span>
<span style="color: #009900;">END</span> <span style="color: #009900;">IF</span><span style="color: #000033;">;</span>
&nbsp;
<span style="color: #009900;">if</span> <span style="color: #FF00FF;">&#40;</span> year_diff <span style="color: #CC0099;">=</span> <span style="color: #008080;">0</span> <span style="color: #FF00FF;">&#41;</span> <span style="color: #009900;">THEN</span>
	RETURN <span style="color: #000099;">CONCAT_WS</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">' '</span><span style="color: #000033;">,</span> month_diff<span style="color: #000033;">,</span> monthstring<span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span>
<span style="color: #009900;">ELSE</span>
	<span style="color: #009900;">if</span> <span style="color: #FF00FF;">&#40;</span>month_diff <span style="color: #CC0099;">&amp;</span>gt<span style="color: #000033;">;</span> <span style="color: #008080;">0</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #009900;">THEN</span>
		RETURN <span style="color: #000099;">CONCAT_WS</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">' '</span><span style="color: #000033;">,</span>year_diff<span style="color: #000033;">,</span> yearstring<span style="color: #000033;">,</span> month_diff<span style="color: #000033;">,</span> monthstring<span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span>
	<span style="color: #009900;">ELSE</span>
		RETURN <span style="color: #000099;">CONCAT_WS</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">' '</span><span style="color: #000033;">,</span>year_diff<span style="color: #000033;">,</span> yearstring<span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span>
	<span style="color: #009900;">END</span> <span style="color: #009900;">IF</span><span style="color: #000033;">;</span>
<span style="color: #009900;">END</span> <span style="color: #009900;">IF</span><span style="color: #000033;">;</span>
&nbsp;
<span style="color: #009900;">END</span> $$
&nbsp;
DELIMITER <span style="color: #000033;">;</span></pre></div></div>

<p>You can then make use of the stored routine to convert Dates into ages by doing so:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SELECT</span> getage<span style="color: #FF00FF;">&#40;</span>BirthDate<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">as</span> UserAge <span style="color: #990099; font-weight: bold;">FROM</span> my_database.users</pre></div></div>

<ul>
<li><a title="http://dev.mysql.com/doc/refman/5.0/en/routine-restrictions.html" href="http://dev.mysql.com/doc/refman/5.0/en/routine-restrictions.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/routine-restrictions.html</a></li>
<li><a title="http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html" href="http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jefferyfernandez.id.au/2008/07/02/mysql-date-age-calculation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Arduino IDE on 64bit openSUSE</title>
		<link>http://www.jefferyfernandez.id.au/2008/04/21/arduino-ide-on-64bit-opensuse/</link>
		<comments>http://www.jefferyfernandez.id.au/2008/04/21/arduino-ide-on-64bit-opensuse/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 23:34:12 +0000</pubDate>
		<dc:creator>Jeffery</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[openSuSe]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[ftdi]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[rxtx]]></category>
		<category><![CDATA[ser2net]]></category>
		<category><![CDATA[usbserial]]></category>

		<guid isPermaLink="false">http://www.jefferyfernandez.id.au/?p=69</guid>
		<description><![CDATA[Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It&#8217;s an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software &#8230; <a href="http://www.jefferyfernandez.id.au/2008/04/21/arduino-ide-on-64bit-opensuse/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="Arduino" href="http://www.arduino.cc/" target="_blank"><img class="align-left alignleft" style="float: left;" title="Arduino Board" src="http://www.jefferyfernandez.id.au/wp-content/uploads/2008/02/arduino.jpg" alt="Arduino Board" width="200" height="139" />Arduino</a> is a tool for making computers that can sense and control more of the physical world than your desktop computer. It&#8217;s an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board.</p>
<p>Unfortunately the serial port  communication driver (RXTX) which comes with the arduino download is not 64 bit compatible. I will describe here how I successfully compiled &amp; installed the driver  to get the Arduino IDE running on a 64 bit openSUSE installation. Most of the instructions should be pretty straight forward to be replicated on an other rpm based distribution. For ubuntu/debain based distributions, you can find the <a title="Arduino IDE on 64 bit Ubuntu Gutsy" href="http://myy.helia.fi/~karte/arduino_editor_on_64_bit_ubuntu_gutsy.html" target="_blank">instructions provided by Tero Karvinen</a> useful.</p>
<h3>Packages Required for Arduino IDE</h3>
<p>The following packages are required to run the Arduino IDE:</p>
<ul>
<li> java-1_5_0-sun</li>
<li> cross-avr-gcc</li>
<li> cross-avr-binutils</li>
<li> avr-libc</li>
</ul>
<h3>Linux USB Serial Converter Driver</h3>
<p>Besides the above software, you will also need a compatible kernel. This means version 2.6.x or at least 2.4.30. For example, it needs USB serial support with the <a title="Future Technology Devices International" href="http://ftdi-usb-sio.sourceforge.net/" target="_blank">FTDI</a> driver. After connecting an Arduino board to your computer via an <a title="Types of USB Connectors" href="http://en.wikipedia.org/wiki/Universal_Serial_Bus#Types_of_USB_connectors" target="_blank">AB USB cable</a>, it should load the ftdi modules automatically. Ensure <em>ftdi_sio</em> and <em>usbserial</em> modules are loaded by executing:</p>
<pre class="usercommand">lsmod | grep ftdi</pre>
<p>It should return output similar to whats shown below:</p>
<pre class="shelloutput">ftdi_sio               54280  0
usbserial              52688  1 ftdi_sio
usbcore               156456  6 ftdi_sio,usbserial,usbhid,ohci_hcd,ehci_hcd</pre>
<p>If not, as root, run:</p>
<pre class="rootcommand">modprobe ftdi_sio</pre>
<p>If there are no errors from the above command, then the module is loaded successfully.</p>
<h3>System Requirements</h3>
<p>The Arduino IDE is java based and RXTX [2] is a native java library providing serial and parallel communication for the Java Development Toolkit. The RXTX lib uses lock files by default. So Before you use lock files you need to do one of two things:</p>
<ol>
<li>Be the <strong>root</strong> or <strong>uucp</strong> user on your machine whenever you use rxtx</li>
<li>Or add the specific user that needs to use rxtx to the group uucp. (preferred)</li>
</ol>
<p>Add your user account to the <strong>uucp</strong> group by going to <strong>yast2</strong> &gt; <strong>Security and Users</strong> &gt; <strong>User Management</strong>. Once you have added yourself to the group, you will need to restart your session to make it affective. Once you are in the new session, verify that your account belongs to the uucp group by executing &#8220;groups&#8221; on the shell. It should give return you a list of groups your account belongs to.</p>
<h3><span id="more-69"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-5896900602713932";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
//2007-10-07: general
google_ad_channel = "5562041263";
//-->
</script><br />
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>Packages required for building rxtx-java</h3>
<ul>
<li>autoconf</li>
<li>automake</li>
<li>libtool</li>
<li>gnu make</li>
<li>gcc</li>
<li>jdk &gt; 1.3 or java-1_5_0-sun-devel</li>
<li>checkinstall (optional)</li>
</ul>
<p>After installing the necessary libraries, you can download and start building the library with the following commands:</p>
<pre class="usercommand">wget http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip</pre>
<pre class="usercommand">unzip rxtx-2.1-7r2.zip</pre>
<pre class="usercommand">cd rxtx-2.1-7r2</pre>
<pre class="usercommand">export JAVA_HOME=/usr/lib64/jvm/java-1.5.0-sun/</pre>
<pre class="usercommand">./configure</pre>
<pre class="usercommand">make</pre>
<p>Once the libraries are built, you can install them by following either one of the following two methods:</p>
<ol>
<li>Build an RPM package with the help of <a title="Checkinstall to the rescue" href="http://www.jefferyfernandez.id.au/2006/05/19/checkinstall-to-the-rescue/" target="_blank">checkinstall<br />
</a>(preferred)</li>
<li>Copy the libs to the arduino libs folder.</li>
</ol>
<p>If you are opting for the checkinstall method, I suggest to name the package rxtx-java. You can then install the package using normal rpm commands. Once you have done that, you need to determine the path to the libraries. Execute the following to obtain the Path to the rxtx libraries:</p>
<pre>rpm -ql librxtx-java | grep RXTXcomm.jar
/usr/java/jdk1.5.0_06/jre/lib/ext/RXTXcomm.jar</pre>
<p>We will now remember to add the path (&#8216;/usr/java/jdk1.5.0_06/jre/&#8217;) to the arduino bootstrap script.</p>
<p>To install the libraries the second way, you can copy the compiled RXTXcomm.jar and librxtxSerial.so files to the arduino lib directory. The libs are built and placed into &#8220;x86_64-unknown-linux-gnu/.libs/&#8221; folder while the jar file should be in the same folder you are in.</p>
<h3>Setting up the Arduino IDE</h3>
<p>Download and untar the Arduino IDE from <a title="Arduino IDE" href="http://www.arduino.cc/en/Main/Software" target="_blank">Arduino Software page</a></p>
<pre class="usercommand">wget http://www.arduino.cc/files/arduino-0010-linux.tgz &amp;&amp; \
tar -xvzf arduino-0010-linux.tgz</pre>
<p>In the arduino/tools directory, make symlinks:</p>
<pre class="usercommand">cd arduino-0010/hardware/tools</pre>
<pre class="usercommand"> ln -s /opt/cross/bin/avr-gcc avr-gcc &amp;&amp; \
ln -s /opt/cross/bin/avr-g++ avr-g++ &amp;&amp; \
ln -s /opt/cross/bin/avr-objcopy avr-objcopy &amp;&amp; \
ln -s /opt/cross/bin/avr-objdump avr-objdump &amp;&amp; \
ln -s /opt/cross/bin/avr-size avr-size</pre>
<p>Copy the compiled RxTx-java libray into the arduino-0010/lib folder. Before doing so rename the existing libraries.</p>
<pre class="usercommand">cd ../../lib/</pre>
<pre class="usercommand">mv librxtxSerial.so librxtxSerial.so.DISABLED</pre>
<pre class="usercommand">mv RXTXcomm.jar RXTXcomm.jar.DISABLED</pre>
<p>Now copy the freshly compiled rxtx libraries into this folder</p>
<pre class="usercommand">cp ../../rxtx-2.1-7r2/x86_64-unknown-linux-gnu/.libs/librxtxSerial.so .</pre>
<pre class="usercommand">cp ../../rxtx-2.1-7r2/RXTXcomm.jar .</pre>
<p>Once you have copied the library and jar file, you are ready to execute the arduino bootstrap script to launch the Arduino IDE.</p>
<pre class="usercommand">./arduino
Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7</pre>
<h3>The Arduino IDE</h3>
<p><img class="align-center" title="Arduino IDE" src="http://www.jefferyfernandez.id.au/wp-content/uploads/2008/02/arduino_ide.png" alt="Arduino IDE" width="500" height="600" /></p>
<h4>Resources</h4>
<ol>
<li><a title="Arduino" href="http://www.arduino.cc" target="_blank">http://www.arduino.cc</a></li>
<li><a title="RXTX" href="http://www.rxtx.org" target="_blank">http://www.rxtx.org</a></li>
<li><a title="Future Technology Devices International" href="http://ftdi-usb-sio.sourceforge.net/" target="_blank">http://ftdi-usb-sio.sourceforge.net/</a></li>
<li><a title="Future Technology Devices International" href="http://www.ftdichip.com/Drivers/3rdPartyDrivers.htm" target="_blank">http://www.ftdichip.com/Drivers/3rdPartyDrivers.htm</a></li>
<li>serproxy: <a title="Serial Proxy" href="http://www.lspace.nildram.co.uk/freeware.html" target="_blank">http://www.lspace.nildram.co.uk/freeware.html</a></li>
<li>ser2net: <a title="ser2net" href="http://ser2net.sourceforge.net" target="_blank">http://ser2net.sourceforge.net</a></li>
<li>Java Comm Serial API How-To for Linux: <a title="Java Comm Serial API How-To for Linux" href="http://wass.homelinux.net/howtos/Comm_How-To.shtml" target="_blank">http://wass.homelinux.net/howtos/Comm_How-To.shtml</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.jefferyfernandez.id.au/2008/04/21/arduino-ide-on-64bit-opensuse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>openSUSE &#8220;Packaging Day II&#8221;</title>
		<link>http://www.jefferyfernandez.id.au/2008/03/15/opensuse-packaging-day-ii/</link>
		<comments>http://www.jefferyfernandez.id.au/2008/03/15/opensuse-packaging-day-ii/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 09:45:27 +0000</pubDate>
		<dc:creator>Jeffery</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[openSuSe]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[openSUSE build service]]></category>
		<category><![CDATA[packaging]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.jefferyfernandez.id.au/?p=73</guid>
		<description><![CDATA[Ever had problems finding a package for your favorite application for your favorite distro? Are you an application developer or project contributor, and want to learn how to provide binary packages for all the popular distros (including openSUSE) automatically? Using &#8230; <a href="http://www.jefferyfernandez.id.au/2008/03/15/opensuse-packaging-day-ii/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="https://build.opensuse.org/"><img style="float: left;" src="http://www.jefferyfernandez.id.au/wp-content/uploads/2008/03/logo-buildservice.png" rel="attachment wp-att-74" alt="openSUSe Build Service logo" title="openSUSe Build Service logo" class="align-left alignleft" height="75" width="127" /></a>Ever had problems finding a package for your favorite application for your favorite distro? Are you an application developer or project contributor, and want to learn how to provide binary packages for all the popular distros (including <a target="_blank" title="openSUSE Linux Distribution" href="http://en.opensuse.org/Welcome_to_openSUSE.org">openSUSE</a>) automatically?</p>
<p>Using the <a target="_blank" title="openSUSE Build Service" href="http://build.opensuse.org">openSUSE Build Service</a>, you can provide software packages for most popular Linux distros using one single service. Rather than maintaining separate systems to build packages, you can take advantage of the openSUSE Build Service and let it do most of the work.</p>
<p>To learn how to leverage the build service, join the openSUSE community on April 4th and 5th on <a target="_blank" title="Internet Relay Chat" href="http://en.wikipedia.org/wiki/IRC">IRC</a> to hone your package building skills. The <i><b>Packaging Days II</b></i> event will be held on Freenode at #opensuse-buildservice. Community members will be standing by to provide support and answer questions about using the build service and creating packages.</p>
<p>Find out more about the <i><b>Packaging Days II</b></i> event at: <a target="_blank" href="http://en.opensuse.org/Packaging/Packaging_Day" title="http://en.opensuse.org/Packaging/Packaging_Day">http://en.opensuse.org/Packaging/Packaging_Day</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jefferyfernandez.id.au/2008/03/15/opensuse-packaging-day-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing TV shows into Mythtv</title>
		<link>http://www.jefferyfernandez.id.au/2008/02/24/importing-tv-shows-into-mythtv/</link>
		<comments>http://www.jefferyfernandez.id.au/2008/02/24/importing-tv-shows-into-mythtv/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 14:25:41 +0000</pubDate>
		<dc:creator>Jeffery</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[multimedia]]></category>
		<category><![CDATA[mythtv]]></category>
		<category><![CDATA[tv shows]]></category>

		<guid isPermaLink="false">http://www.jefferyfernandez.id.au/?p=67</guid>
		<description><![CDATA[I have been using the popular open source multimedia programme called mythtv for a while now. Apart from recording my favourite TV shows, I also utilise the various modules like mythmusic, mythnews, mythvideo and mythweb. Though you can use mythvideo &#8230; <a href="http://www.jefferyfernandez.id.au/2008/02/24/importing-tv-shows-into-mythtv/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img style="float: left;" src="http://www.jefferyfernandez.id.au/wp-content/uploads/2008/02/mythtv-blue_menu.jpg" rel="attachment wp-att-68" alt="mythtv" title="mythtv" class="align-left alignleft" height="150" width="200" />I have been using the popular open source multimedia programme called <a target="_blank" title="Mythtv" href="http://en.wikipedia.org/wiki/Mythtv">mythtv</a> for a while now. Apart from recording my favourite TV shows, I also utilise the various modules like mythmusic, mythnews, mythvideo and mythweb. Though you can use mythvideo to view videos which are not tv recordings, there are no specific modules which can import a show into mythtv.</p>
<p>But wait, just when you think its not possible to import a show into the mythtv recordings, there is a way to do so. There is a perl script called &#8220;myth.rebuilddatabase.pl&#8221; which comes with the mythtv-doc package of mythtv. Usually the &#8220;myth.rebuilddatabase.pl&#8221; script resides at &#8220;/usr/share/doc/packages/mythtv-doc/contrib/&#8221; folder. Else, If you are on an rpm based system you can look for its path with the following command:</p>
<pre class="usercommand">rpm -qal "myth*" | grep "\.pl"</pre>
<p>This should return all the available perl scripts which are distributed with mythtv. Now to use the script, we need make a copy of the script to your home folder and configure it. Edit the file and update the relevant mysql mythtv database connection details. Now copy the tv show files which you want to import, into your mythtv recordings folder.<br />
<span id="more-67"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-5896900602713932";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
//2007-10-07: general
google_ad_channel = "5562041263";
//-->
</script><br />
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h2>Meta Data</h2>
<p>To import the show into Mythtv, you have the option of importing the meta data associated with it. The meta data consists of the show title, sub-title, description, show time and most importantly the channel id. To retrieve the channel ids which are available on your mythtv installation, you can query the mysql database with the following shell command:<br />
<code class="usercommand">mysql --host [localhost] --user [mythtv] -p -e 'use [mythconverg]; select chanid, name, callsign from channel where visible=1'</code><br />
Change the appropriate values in the command shown above (in brackets) to reflect your database setup and hit enter. It should now prompt you to enter the database password for the mythtv database table and then will list the available channels on your mythtv installation.</p>
<h2>Import Show</h2>
<p>To import the show we change into the recordings folder and just execute the script followed by the file extension of the show we are importing:</p>
<pre class="usercommand">~/myth.rebuilddatabase.pl --ext avi</pre>
<p>In this instance I am importing an .avi file. The rebuild script scans your mythtv directory and each file will be checked against your database to see if it exists.  If they do not, you will be prompted for a channel-id, the show title, subtitle, description, show start time and duration of the show, and a record will be created. Finally it will prompt you with the question of whether you want to &#8220;build a seek table for this file&#8221;. Just say yes and it will update the &#8220;seek&#8221; information for that show. Another important thing to remember is not to give the same &#8220;show time&#8221; of an already existing show for the same channel id, else it will produce a mysql database error &#8220;Duplicate entry&#8221;.</p>
<h3>Final Note:</h3>
<p>I have noted that only the following files types can be imported: {nuv,mpg,mpeg,avi}. I am hoping to import a few ogg based files into mythtv. I will update this entry on my attempt to import those ogg files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jefferyfernandez.id.au/2008/02/24/importing-tv-shows-into-mythtv/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

