<?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>Nimal&#039;s Weblog &#187; Tech Notes</title>
	<atom:link href="http://nimal.info/blog/technology/technotes/feed/" rel="self" type="application/rss+xml" />
	<link>http://nimal.info/blog</link>
	<description>Nimal blogs here</description>
	<lastBuildDate>Sat, 07 Jan 2012 08:44:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Setup QUT Student, Staff Email on Android Devices</title>
		<link>http://nimal.info/blog/2012/setup-qut-student-staff-email-on-android-devices/</link>
		<comments>http://nimal.info/blog/2012/setup-qut-student-staff-email-on-android-devices/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 20:30:55 +0000</pubDate>
		<dc:creator>Nimal</dc:creator>
				<category><![CDATA[Tech Notes]]></category>
		<category><![CDATA[Brisbane]]></category>

		<guid isPermaLink="false">http://nimal.info/blog/?p=1033</guid>
		<description><![CDATA[<p>Setting up the Outlook Exchange email accounts from QUT on your Android devices can be tricky. This is how you setup you student or staff email to sync. <a href="http://nimal.info/blog/2012/setup-qut-student-staff-email-on-android-devices/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><a href="http://nimal.info/blog/2012/setup-qut-student-staff-email-on-android-devices/">Setup QUT Student, Staff Email on Android Devices</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></description>
			<content:encoded><![CDATA[<p>Having access to my work/school email on my smartphone is important me when I am &#8216;working from home, away from home&#8217;. I recently switched to my <a title="Samsung Nexus S on Vodafone" href="http://nimalog.tumblr.com/post/13293268256/now-on-vodafone">Nexus S</a> and upgraded the OS to the latest <a title="Upgraded Nexus S to ICS" href="https://twitter.com/talkout/statuses/148730128443260929">Ice Cream Sandwich</a>. But when I tried to add my emails, there aren&#8217;t many guides on the <a title="Queensland University of Technology" href="http://www.qut.edu.au/">QUT</a> website on setting up exchange email accounts on Android devices. As always, after a bit of Googling and guess-work I was able to set up my two account on my Nexus S. And this is how I did it&#8230;</p>
<p>For all QUT undergraduate and non-research degree students who have <strong><em>@connect.qut.edu.au</em></strong> email addresses,<br />
<a href="http://imgur.com/U5MSo"><img class="alignright size-full wp-image-1038" title="Android Outlook Exchange Email Settings for QUT Connect Student" src="http://nimal.info/uploads/android-qut-email-student-U5MSo.png" alt="Android Outlook Exchange Email Settings for QUT Connect Student" width="640" height="480" /></a></p>
<ul>
<li>Username: \firstname.lastname@connect.qut.edu.au</li>
<li>Server: pod51000.outlook.com</li>
</ul>
<p>For QUT staff email accounts that end with <strong><em>@qut.edu.au</em></strong>,<br />
<img class="alignright size-full wp-image-1037" title="Android Outlook Exchange Email Settings for QUT Staff" src="http://nimal.info/uploads/android-qut-email-staff-Screenshot_2012-01-04-11-44-05.png" alt="Android Outlook Exchange Email Settings for QUT Staff" width="640" height="480" /></p>
<ul>
<li>Username: qutad\USERNAME</li>
<li>Server: outlook.qut.edu.au</li>
</ul>
<p>I&#8217;m doing my PhD at QUT, and all HRD (ie PhD and Masters Research) students have a different type of emails (similar to staff emails) which end with <strong><em>@student.qut.edu.au</em></strong>,<br />
<img class="alignright size-full wp-image-1036" title="Android Outlook Exchange Email Settings for QUT HRD Student" src="http://nimal.info/uploads/android-qut-email-hrd-student-Screenshot_2012-01-04-11-44-38.png" alt="Android Outlook Exchange Email Settings for QUT HRD Student" width="640" height="480" /></p>
<ul>
<li>Username: qutad\USERNAME</li>
<li>Server: outlook.qut.edu.au</li>
</ul>
<p><a href="http://nimal.info/blog/2012/setup-qut-student-staff-email-on-android-devices/">Setup QUT Student, Staff Email on Android Devices</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></content:encoded>
			<wfw:commentRss>http://nimal.info/blog/2012/setup-qut-student-staff-email-on-android-devices/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Back to Gmail: Migrating emails from Google Apps mail to Gmail</title>
		<link>http://nimal.info/blog/2011/migrating-from-google-apps-mail-back-to-gmail/</link>
		<comments>http://nimal.info/blog/2011/migrating-from-google-apps-mail-back-to-gmail/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 22:30:27 +0000</pubDate>
		<dc:creator>Nimal</dc:creator>
				<category><![CDATA[Tech Notes]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[How-to]]></category>

		<guid isPermaLink="false">http://nimal.info/blog/?p=876</guid>
		<description><![CDATA[<p>This guide will help you migrate from your Google Apps email account to a Gmail account automatically using the (free) 'imapsync' software. <a href="http://nimal.info/blog/2011/migrating-from-google-apps-mail-back-to-gmail/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><a href="http://nimal.info/blog/2011/migrating-from-google-apps-mail-back-to-gmail/">Back to Gmail: Migrating emails from Google Apps mail to Gmail</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></description>
			<content:encoded><![CDATA[<p>It is a common scenario for people to migrate their Gmail accounts to Apps mail accounts. There are more than many how-to guides and tutorials covering this direction of the migration. But how about the opposite.</p>
<p>There are many obvious reasons for someone to migrate (back) to Gmail from a Google Apps mail account. Google Apps mail is used by many organisations, schools, etc. Thus, when we leave from that organisation, it becomes a necessity to migrate all our emails elsewhere.<br />
<img class="aligncenter size-full wp-image-910" title="Google Apps mail to Gmail" src="http://nimal.info/uploads/apps-to-gmail.jpg" alt="Google Apps mail to Gmail" width="240" height="120" /><br />
So lets jump into this <del>quick</del> tutorial on <em>how to migrate all emails from Google Apps mail to Gmail</em>. There are few other mechanisms suggested across the internet, but the one that works smoothly is using <em><a title="imapsync software" href="http://ks.lamiral.info/imapsync/" target="_blank">&#8220;imapsync&#8221;</a></em>.</p>
<p><em>&#8220;imapsync&#8221;</em> software is a command line tool allowing incremental and recursive IMAP transfers from one mailbox to another. It is useful for Gmail account migration or account backups.</p>
<p><strong>IMPORTANT NOTE:</strong></p>
<ul>
<li>&#8220;<em>imapsync</em>&#8221; was a free tool, but now the author is charging almost $45 for a copy. It is affordable for commercial use, but for personal use the price is an overkill.</li>
<li>The earlier versions of this software can be found on the internet and still be used without copyright violations. <em>(<a title="Download 'imapsync' Free" href="https://s3.amazonaws.com/imapsync/imapsync-1.350.tar.gz" target="_blank">DOWNLOAD the earlier version for FREE</a>)</em>.</li>
<li>This guide is based on a Windows installation. The use can be easily adapted to Linux and other platforms as we will be compiling from the Perl source code and running the software. <em>(Those who are on Linux, you could simply follow the install instructions with the download file)</em>.</li>
</ul>
<p><strong>Step 1: Install Perl</strong></p>
<ol>
<li>Download and install <em><a title="Get Strawberry Perl" href="http://strawberryperl.com/" target="_blank">&#8220;Strawberry Perl&#8221;</a></em>. <em>(Install to the default install location).</em></li>
<li>Double-click and Run the &#8220;<em>update_env.pl</em>&#8221; batch file to add the environment variables.</li>
</ol>
<p><strong>Step 2: Setup the Prerequisites</strong></p>
<ol>
<li>Open &#8220;<em>CPAN Client</em>&#8221; under <em>Start Menu -&gt; Programs -&gt; Strawberry Perl -&gt; Tools</em>.</li>
<li>Run the following commands individually:</li>
<ul>
<li>install Mail::IMAPClient</li>
<li>install Digest::MD5</li>
<li>install Term::ReadKey</li>
<li>install IO::Socket::SSL</li>
</ul>
<ul>
<li>If this presents a warning with &#8220;<em>Net::SSLeay could not find a random number generator</em>&#8221; and &#8220;<em>Do you REALLY want to continue? [Default: no]</em>&#8220;, give &#8220;<em>yes</em>&#8221; and continue.</li>
</ul>
<li>install Date::Manip</li>
<li>install File::Spec</li>
<li>install Digest::HMAC_MD5</li>
<li>install PAR::Packer</li>
<li>At this point you should be all set with the Perl setup and the following command should not give any errors.</li>
<ul>
<li>perl -mMail::IMAPClient -mDigest::MD5 -mTerm::ReadKey -mIO::Socket::SSL -mDate::Manip -mFile::Spec -mDigest::HMAC_MD5 -e &#8221;</li>
</ul>
</ol>
<p><strong>Step 3: Install <em>&#8216;imapsync&#8217;</em></strong></p>
<ol>
<li>Download the earlier version of &#8216;imapsync&#8217; for free from <a title="Download 'imapsync' Free" href="https://s3.amazonaws.com/imapsync/imapsync-1.350.tar.gz" target="_blank">here</a> (or buy the latest version from <a title="Buy 'imapsync'" href="http://ks.lamiral.info/imapsync/#buy_source" target="_blank">here</a>).</li>
<li>Extract the downloaded file, if you can&#8217;t extract a tar.gz, use <a title="7-Zip open source software" href="http://www.7-zip.org/" target="_blank">7-Zip</a>.</li>
<li>Open the &#8220;<em>build_exe</em>&#8221; batch file in a Notepad and change the folder path to the extracted folder.</li>
<li>Run the &#8220;<em>build_exe</em>&#8221; batch file.</li>
<li>This should have created a <em>&#8220;imapsync.exe&#8221;</em>.</li>
</ol>
<p><strong>Step 4: Using <em>&#8216;imapsync&#8217;</em></strong></p>
<ol>
<li>Open <em>&#8220;Command Prompt&#8221;</em>.</li>
<li>Change directory to the <em>&#8216;imapsync&#8217;</em> folder.</li>
<li>The basic <em>&#8216;imapsync&#8217;</em> command is,</li>
<ul>
<li>
<pre>imapsync --host1 mail.oldserver.com --user1 theoden ^
--host2 mail.newserver.com --user2 'theoden@newserver.com'</pre>
</li>
</ul>
<li>For Gmail, change the following command with your Apps mail login and Gmail login details.</li>
<ul>
<li>
<pre>imapsync ^
--host1 imap.gmail.com --port1 993 --ssl1 --authmech1 LOGIN ^
--user1 theuser@oldmail.com --password1 password4user1 ^
--host2 imap.gmail.com --port1 993 --ssl2 --authmech2 LOGIN ^
--user2 newuserid@gmail.com --password2 password4gmail ^
--split1 100 --split2 100 ^
--reconnectretry1 30 --reconnectretry2 30 ^
--noauthmd5 --noreleasecheck ^
--timeout 1200  --allowsizemismatch</pre>
</li>
</ul>
<li>Paste the modified command into the Command Prompt, &#8216;<em>imapsync</em>&#8216; should sync you mail accounts accordingly.</li>
<li>It could take, hours <em>(or days)</em> to complete the sync, based on your internet connection speed and the amount of email in your mailboxes.</li>
<li>For more <em>&#8216;imapsync&#8217;</em> command reference run,</li>
<ul>
<li>
<pre>imapsync --help</pre>
</li>
</ul>
<li>Once the sync is complete, you could also <a title="Forwarding mail to another email account automatically" href="http://mail.google.com/support/bin/answer.py?answer=10957" target="_blank">setup a forward all mails</a> to the new Gmail account from the old Google Apps mail account.</li>
</ol>
<p>This guide can look a bit more technical and for the &#8216;geek-handed&#8217;. If you follow the steps it should be straight forward.</p>
<p>However, if you are afraid you might burn your computer by doing this, just ask your friendly geek-next-door, and s/he should be happy to help you.</p>
<p><strong><em>Happy migrating back to Gmail&#8230;!</em></strong></p>
<p><a href="http://nimal.info/blog/2011/migrating-from-google-apps-mail-back-to-gmail/">Back to Gmail: Migrating emails from Google Apps mail to Gmail</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></content:encoded>
			<wfw:commentRss>http://nimal.info/blog/2011/migrating-from-google-apps-mail-back-to-gmail/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>LaTeX on Windows with MiKTeX and Notepad++</title>
		<link>http://nimal.info/blog/2010/latex-on-windows-with-miktex-and-notepad/</link>
		<comments>http://nimal.info/blog/2010/latex-on-windows-with-miktex-and-notepad/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 07:15:27 +0000</pubDate>
		<dc:creator>Nimal</dc:creator>
				<category><![CDATA[Tech Notes]]></category>

		<guid isPermaLink="false">http://nimal.info/blog/?p=429</guid>
		<description><![CDATA[<p>Notepad++ is a versatile text editor and source code editor for Windows. I use it as my default text editor on Windows. For convenience of compiling .tex files while editing we can simply add a run command to Notepad++. This &#8230; <a href="http://nimal.info/blog/2010/latex-on-windows-with-miktex-and-notepad/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><a href="http://nimal.info/blog/2010/latex-on-windows-with-miktex-and-notepad/">LaTeX on Windows with MiKTeX and Notepad++</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></description>
			<content:encoded><![CDATA[<p><a title="Notepad++" href="http://en.wikipedia.org/wiki/Notepad%2B%2B" target="_blank">Notepad++</a> is a versatile text editor and source code editor for Windows. I use it as my default text editor on Windows. For convenience of compiling .tex files while editing we can simply add a run  command to Notepad++.</p>
<p>This is a simple &#8220;how to&#8221; for conveniently using Notepad++ as the editor for LaTex (using <a title="MiKTeX" href="http://en.wikipedia.org/wiki/MiKTeX" target="_blank">MiKTex</a>) on Windows.</p>
<ul>
<li>Install <a title="MiKTeX" href="http://miktex.org/" target="_blank">MiKTeX</a></li>
<li>Install <a title="Notepad++" href="http://www.notepad-plus-plus.org/" target="_blank">Notepad++</a>. (This comes with syntax highlighting for LaTeX, but for BibTex add the <a title="BibTeX Style for Notepad++" href="http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=User_Defined_Language_Files#B" target="_blank">user style</a>.)</li>
<li>Create a .bat file with the following code:

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;"><span style="color: #FF1010; font-weight: bold;">:: Called from Notepad++ Run</span>
<span style="color: #FF1010; font-weight: bold;">:: [path_to_bat_file] &quot;$(CURRENT_DIRECTORY)&quot; &quot;$(NAME_PART)&quot;</span>
&nbsp;
<span style="color: #FF1010; font-weight: bold;">:: Change Drive and  to File Directory</span>
<span style="color: #66cc66;">%~</span>d1
cd <span style="color: #66cc66;">%</span>1
&nbsp;
<span style="color: #FF1010; font-weight: bold;">:: Run Cleanup</span>
<span style="color: #800080;">call</span><span style="color: #FF1010; font-weight: bold;">:cleanup</span>
&nbsp;
<span style="color: #FF1010; font-weight: bold;">:: Run pdflatex -&amp;gt; bibtex -&amp;gt; pdflatex -&amp;gt; pdflatex</span>
pdflatex <span style="color: #66cc66;">%</span>2
bibtex  <span style="color: #66cc66;">%</span>2
<span style="color: #FF1010; font-weight: bold;">:: If you are using multibib the following will run bibtex on all aux files</span>
<span style="color: #FF1010; font-weight: bold;">:: FOR /R . %%G IN (*.aux) DO bibtex %%G</span>
pdflatex <span style="color: #66cc66;">%</span>2
pdflatex <span style="color: #66cc66;">%</span>2
&nbsp;
<span style="color: #FF1010; font-weight: bold;">:: Run Cleanup</span>
<span style="color: #800080;">call</span><span style="color: #FF1010; font-weight: bold;">:cleanup</span>
&nbsp;
<span style="color: #FF1010; font-weight: bold;">:: Open PDF (Script updated based on comments by 'menfeser'</span>
<span style="color: #FF1010; font-weight: bold;">:: START &quot;&quot; &quot;C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe&quot; %2.pdf</span>
START <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">%</span>2.pdf
&nbsp;
<span style="color: #FF1010; font-weight: bold;">:: Cleanup Function</span>
<span style="color: #FF1010; font-weight: bold;">:cleanup</span>
<span style="color: #FF1010; font-weight: bold;">:: del *.log</span>
del <span style="color: #66cc66;">*</span>.dvi
del <span style="color: #66cc66;">*</span>.aux
del <span style="color: #66cc66;">*</span>.bbl
del <span style="color: #66cc66;">*</span>.blg
del <span style="color: #66cc66;">*</span>.brf
del <span style="color: #66cc66;">*</span>.out
<span style="color: #800080;">goto</span><span style="color: #FF1010; font-weight: bold;">:eof</span></pre></div></div>

</li>
<li>Add the batch file as a run command:
<ul>
<li>Notepad++ -&gt; Run -&gt; &lt;PATH_TO_BAT_FILE&gt; &#8220;$(CURRENT_DIRECTORY)&#8221; &#8220;$(NAME_PART)&#8221;</li>
<li>(Note the surrounded &#8221; before and after CURRENT_DIRECTOR and NAME_PART)</li>
<li>Create a keyboard shortcut for this.</li>
</ul>
</li>
<li>Now create a LaTeX file in Notepad++, Save and Run (using the short key defined).</li>
</ul>
<p>Note:</p>
<ol>
<li>MiKTex should be added automatically to Windows &#8220;path&#8221; when it is installed, if not add &#8220;WHERE_MIKTEX_INSTALLED\miktex\bin&#8221; to path <a title="How To Manage Environment Variables in Windows XP" href="http://support.microsoft.com/kb/310519" target="_blank">manually</a>.</li>
<li>This is just a work flow that works for me, you can modify it to suit yours.</li>
<li>Plagiarised from various sources on the Internet. <img src='http://nimal.info/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p><a href="http://nimal.info/blog/2010/latex-on-windows-with-miktex-and-notepad/">LaTeX on Windows with MiKTeX and Notepad++</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></content:encoded>
			<wfw:commentRss>http://nimal.info/blog/2010/latex-on-windows-with-miktex-and-notepad/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Parse RSS feeds with PHP</title>
		<link>http://nimal.info/blog/2009/parse-rss-feeds-with-php/</link>
		<comments>http://nimal.info/blog/2009/parse-rss-feeds-with-php/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 12:15:04 +0000</pubDate>
		<dc:creator>Nimal</dc:creator>
				<category><![CDATA[Tech Notes]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[Feeds]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://nimal.info/blog/?p=310</guid>
		<description><![CDATA[<p>RSS feeds are very common today, and at times we want to write a simple script to grab some information from a feed. <a href="http://nimal.info/blog/2009/parse-rss-feeds-with-php/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><a href="http://nimal.info/blog/2009/parse-rss-feeds-with-php/">Parse RSS feeds with PHP</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></description>
			<content:encoded><![CDATA[<p>RSS feeds are very common today, and at times we want to write a simple script to grab some information from a feed.</p>
<p>PHP has got and extensive set of functions that can be used to manipulate XML (RSS feeds or even HTML) files. PHP DOM library is one of the handy libraries that can be used to parse RSS feeds in PHP. DOM (Document Object Model) is a standard way for accessing and manipulating XML documents. XML documents can be represented in tree-structure (a node tree), with the elements, attributes, and text defined as nodes.</p>
<p>Below you can find the script for parsing a standard RSS feeds:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Create a new DOMDocument object</span>
<span style="color: #000088;">$doc</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DOMDocument<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Load the RSS file into the object</span>
<span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://feeds.feedburner.com/talkouttrojans'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Initialize empty array</span>
<span style="color: #000088;">$arrFeeds</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Get a list of all the elements with the name 'item'</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'item'</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$node</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$itemRSS</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$node</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'desc'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$node</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'link'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$node</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'link'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'date'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$node</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pubDate'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">array_push</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$arrFeeds</span><span style="color: #339933;">,</span> <span style="color: #000088;">$itemRSS</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Output</span>
<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$arrFeeds</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The getElementsByTagName method is used, within the loop of the item nodes, to get the nodeValue for the title, description, link and date tags. The nodeValue is the text within the node. An array is used to store each set of values and each array represents an entry in the big array that holds our structured RSS data. At the end of the script all the data will be hold by the $arrFeeds array, which is well structured and can be used to display or further manipulation.</p>
<p>One drawback of using the DOM library is that it reads the entire XML document into memory, and then we use the functions for manipulating the data. Thus this method is that is not recommended for large XML documents, which would take too much memory to build the model of the document.</p>
<p>Anyway, usually the feeds we are dealing with are of normal size, and this won&#8217;t be an issue at most occasions.</p>
<p><a href="http://nimal.info/blog/2009/parse-rss-feeds-with-php/">Parse RSS feeds with PHP</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></content:encoded>
			<wfw:commentRss>http://nimal.info/blog/2009/parse-rss-feeds-with-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Text to Image in PHP with GD</title>
		<link>http://nimal.info/blog/2009/text-to-image-in-php-with-gd/</link>
		<comments>http://nimal.info/blog/2009/text-to-image-in-php-with-gd/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 17:03:00 +0000</pubDate>
		<dc:creator>Nimal</dc:creator>
				<category><![CDATA[Tech Notes]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://nimal.info/blog/?p=132</guid>
		<description><![CDATA[<p>This is simple script to demonstrate the capabilities of PHP with the GD library, which provides a lot of image functions that can be useful in many applications. <a href="http://nimal.info/blog/2009/text-to-image-in-php-with-gd/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><a href="http://nimal.info/blog/2009/text-to-image-in-php-with-gd/">Text to Image in PHP with GD</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></description>
			<content:encoded><![CDATA[<p>This is simple script to demonstrate the capabilities of <a href="../">PHP</a> with the <a href="http://us2.php.net/manual/en/book.image.php"><acronym title="Graphics Draw">GD</acronym> library</a>, which provides a lot of image    functions that can be useful in many applications. GD provides a rich set of functions. For a complete list of these functions, check the <a href="http://us2.php.net/manual/en/ref.image.php">PHP manual</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-Type: image/png'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Text to be converted to image</span>
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Hello World'</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Font to use, give accessible path from script</span>
<span style="color: #000088;">$font</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'./arial.ttf'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Convert HTML entities into ISO-8859-1</span>
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">html_entity_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">ENT_NOQUOTES</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;ISO-8859-1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Create the image</span>
<span style="color: #000088;">$im</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imagecreatetruecolor</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">160</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">160</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$white</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imagecolorallocate</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$im</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">255</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">255</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">255</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$black</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imagecolorallocate</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$im</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Create some colors</span>
<span style="color: #990000;">imagefilledrectangle</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$im</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">160</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">80</span><span style="color: #339933;">,</span> <span style="color: #000088;">$white</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Add the text</span>
<span style="color: #990000;">imagettftext</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$im</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">12</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span> <span style="color: #000088;">$black</span><span style="color: #339933;">,</span> <span style="color: #000088;">$font</span><span style="color: #339933;">,</span> <span style="color: #000088;">$out</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">imagepng</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$im</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">imagedestroy</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$im</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">exit</span><span style="color: #339933;">;</span></pre></div></div>

<p>GD can also be used to create and manipulate image files in a variety of different image formats, including <a href="http://us2.php.net/manual/en/function.imagegif.php"><acronym title="Graphic Interchange Format">GIF</acronym></a>, <a href="http://us2.php.net/manual/en/function.imagepng.php"><acronym title="Portable Network Graphics">PNG</acronym></a>,    <a href="http://us2.php.net/manual/en/function.imagejpeg.php"><acronym title="Joint Photographic Experts Group">JPEG</acronym></a>, <a href="http://us2.php.net/manual/en/function.imagewbmp.php"><acronym title="Wireless Bitmap">WBMP</acronym></a>, and <acronym>XPM</acronym>.</p>
<p><em><strong>Limitations:</strong></em></p>
<ul>
<li>Though GD supports Unicode text inputs, it doesn&#8217;t support <strong> </strong><a href="http://en.wikipedia.org/wiki/Complex_text_layout"><strong>complex text rendering</strong></a></li>
<li> Complex Text Rendering is required for properly displaying many language texts, such as the <a title="Arabic alphabet" href="http://en.wikipedia.org/wiki/Arabic_alphabet">Arabic alphabet</a> and scripts of the <a class="mw-redirect" title="Brahmic family" href="http://en.wikipedia.org/wiki/Brahmic_family">Brahmic family</a>, which includes Tamil and many other Indic scripts.</li>
</ul>
<p><em><strong>There is a alternative for this using <a title="Pango" href="http://en.wikipedia.org/wiki/Pango">Pango</a> and <a href="http://cairographics.org/">Cairo</a> in PHP. I&#8217;ll post a detailed update on that in my next post.</strong></em></p>
<p><a href="http://nimal.info/blog/2009/text-to-image-in-php-with-gd/">Text to Image in PHP with GD</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></content:encoded>
			<wfw:commentRss>http://nimal.info/blog/2009/text-to-image-in-php-with-gd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Activate Oracle on XAMPP for Windows</title>
		<link>http://nimal.info/blog/2009/activate-oracle-on-xampp-for-windows/</link>
		<comments>http://nimal.info/blog/2009/activate-oracle-on-xampp-for-windows/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 04:30:00 +0000</pubDate>
		<dc:creator>Nimal</dc:creator>
				<category><![CDATA[Tech Notes]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[XAMPP]]></category>

		<guid isPermaLink="false">http://nimal.info/blog/?p=131</guid>
		<description><![CDATA[<p>PHP has got the OCI8 extension, which provides Oracle connectivity to PHP application, and OCI8 uses Oracle Instant Client Package to get Oracle specific functions. <a href="http://nimal.info/blog/2009/activate-oracle-on-xampp-for-windows/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><a href="http://nimal.info/blog/2009/activate-oracle-on-xampp-for-windows/">Activate Oracle on XAMPP for Windows</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></description>
			<content:encoded><![CDATA[<p><a style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" href="http://1.bp.blogspot.com/_QU2k3YoKpNc/SpBSHpW4wRI/AAAAAAAACyY/FU8GSbpeVK0/s1600-h/php-med-trans-light.gif"><img src="http://1.bp.blogspot.com/_QU2k3YoKpNc/SpBSHpW4wRI/AAAAAAAACyY/FU8GSbpeVK0/s320/php-med-trans-light.gif" border="0" alt="" /></a>With the default installation of <a href="http://www.apachefriends.org/en/xampp-windows.html">XAMPP for Windows</a>, we don&#8217;t get <a href="http://www.php.net/">PHP</a> <a href="http://www.oracle.com/">Oracle</a> connectivity enabled. This can be enabled easily when you need to connect to a <a href="http://en.wikipedia.org/wiki/Oracle_Database">Oracle Database</a> from your PHP application/script. <a href="http://en.wikipedia.org/wiki/PHP">PHP</a> has got the <a href="http://www.php.net/oci8">OCI8</a> extension, which provides Oracle connectivity to PHP application, and OCI8 uses <a href="http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html">Oracle Instant Client Package</a> to get Oracle specific functions.<br />
<a style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;" href="http://2.bp.blogspot.com/_QU2k3YoKpNc/SpBSNPGLzAI/AAAAAAAACyg/yYTx4wuz39E/s1600-h/database_clr.gif"><img src="http://2.bp.blogspot.com/_QU2k3YoKpNc/SpBSNPGLzAI/AAAAAAAACyg/yYTx4wuz39E/s320/database_clr.gif" border="0" alt="" /></a><br />
I had the need to connect to a Oracle Database from a PHP script in one of my recent projects, the following is what I did to enable Oracle connectivity in XAMPP for Windows.</p>
<ol>
<li>In your XAMPP Start Page, go to <strong>phpinfo, </strong>look for string <strong>oci8</strong>. If string found it indicate that connection to oracle is available, otherwise to activate connection do the following steps:</li>
<li>Open the currently used <strong>php.ini</strong> file by looking at the <strong>phpinfo</strong>, from the XAMPP folder.</li>
<li>Find string <strong>;extension=php_oci8.dll</strong>. Remove the semicolon (<strong>;</strong>) ahead of the string to activate the oracle extension.</li>
<li>Save the <strong>php.ini </strong>file.</li>
<li>Download the &#8220;Instant Client Package &#8211; Basic&#8221; for Windows from the <a href="http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html" target="_blank">OTN Instant Client page</a>. Unzip it to c:\instantclient_11_1</li>
<li>Edit the PATH environment setting and add c:\instantclient_11_1 before any other Oracle directories. For example, on Windows XP, follow <strong>Start -&gt; Control Panel -&gt; System -&gt; Advanced -&gt; Environment Variables</strong> and edit PATH in the System variables list.</li>
<li>Set desired Oracle globalization language environment variables such as NLS_LANG. If nothing is set, a default local environment will be assumed. See <a href="http://www.oracle.com/technology/tech/php/pdf/globalizing_oracle_php_applications.pdf" target="_blank">An Overview on Globalizing Oracle PHP Applications</a> for more details.</li>
<li>Unset Oracle variables such as ORACLE_HOME and ORACLE_SID, which are unnecessary with Instant Client (if they are set previously).</li>
<li>Restart XAMPP (or Start if its not already started).</li>
<li>To make sure that connection to oracle database has successfully activated, go to phpinfo. Find string: oci8. If found, then XAMPP can now communicate with Oracle Database.</li>
</ol>
<p>The steps to do the same in a Linux box are almost similar, except there you will use the Linux versions of the packages and setting PATH variables would be different.</p>
<p>You can ping me back with a comment if you run into any issues, I might be able to help you or I can learn from you.</p>
<p><strong><em>Reference:</em></strong></p>
<ul>
<li><a href="http://www.oracle.com/technetwork/articles/dsl/technote-php-instant-084410.html" target="_blank">http://www.oracle.com/technology/pub/notes/technote_php_instant.html</a></li>
</ul>
<p><a href="http://nimal.info/blog/2009/activate-oracle-on-xampp-for-windows/">Activate Oracle on XAMPP for Windows</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></content:encoded>
			<wfw:commentRss>http://nimal.info/blog/2009/activate-oracle-on-xampp-for-windows/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Free calls to US using Google Voice &amp; Gizmo (with IPKall or a Friend in US)</title>
		<link>http://nimal.info/blog/2009/free-calls-to-us-using-google-voice-gizmo/</link>
		<comments>http://nimal.info/blog/2009/free-calls-to-us-using-google-voice-gizmo/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 09:50:00 +0000</pubDate>
		<dc:creator>Nimal</dc:creator>
				<category><![CDATA[Tech Notes]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://nimal.info/blog/?p=129</guid>
		<description><![CDATA[<p>So how did I get my Google Voice number from outside US... Yeah I live in Sri Lanka, and I have registered my Google Voice number and use it without any restrictions...! <a href="http://nimal.info/blog/2009/free-calls-to-us-using-google-voice-gizmo/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><a href="http://nimal.info/blog/2009/free-calls-to-us-using-google-voice-gizmo/">Free calls to US using Google Voice &#038; Gizmo (with IPKall or a Friend in US)</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></description>
			<content:encoded><![CDATA[<p><strong><em>[Update: Gizmo5 has been acquired by Google and so new user sign-up has  been suspended. Use <a href="https://www.callcentric.com/login/" target="_blank">CallCentric.com</a> to get a SIP number instead of Gizmo5 and <a href="http://download.cnet.com/Express-Talk/3000-2349_4-10400187.html?tag=mncol;1" target="_blank">Express Talk</a> instead of Gizmo5 client. Gmail can also be used as a client for Google Voice. An updated guide can be found at <a href="http://www.labnol.org/" target="_blank">Digital Inspiration</a>, titled <a href="http://www.labnol.org/internet/get-google-voice-phone-number/18425/" target="_blank">Get Google Voice from Outside the U.S.</a>]</em></strong></p>
<p><strong>So how did I get my Google Voice number from outside US&#8230; </strong>Yeah I live in Sri Lanka, and I have registered my Google Voice number and use it without any restrictions&#8230;!</p>
<p><a title="Google Voice" href="http://www.google.com/voice" target="_blank">Google Voice</a> is a wonderful service that functions like a virtual phone switchboard, and you can manage calls and route them to your various phones, voice mail, etc. It gives you a free phone number that can receive regular phone calls and route them to any other actual phones you have connected to your account.</p>
<p>Unfortunately, currently its forwarding abilities are limited only to US phones. Also you are not allowed to access service registration when you are outside US. But I was able to do some workaround with the help of couple of online guides to create my own Google Voice number.</p>
<p><strong><span style="text-decoration: underline;">How to signup to Google Voice?</span></strong><br />
Currently its only by &#8216;invite mode&#8217; but you can get an invitation within a week or so. During the signup process you will be required to verify your account via a US telephone number.</p>
<p><strong><span style="text-decoration: underline;">How to access the Google Voice website for signup from outside US?</span></strong> <em>(After you are signed-up you are allowed to access even from outside US)</em></p>
<ol>
<li><strong>Get a friend of your&#8217;s in US to do this.</strong></li>
<li>Use a SOCKS Tunnel to access.<em> (I won&#8217;t suggest this as its risky, also web based proxies won&#8217;t help)</em></li>
</ol>
<p><strong><span style="text-decoration: underline;">How to get a US number and verify it when you are outside US?</span></strong></p>
<ol>
<li>Get a friend of your&#8217;s in US to add his home number and verify it for you.</li>
<li>Buy a US number as a <a href="http://en.wikipedia.org/wiki/Gizmo5" target="_blank">CallIn numbe</a>r on <a href="http://en.wikipedia.org/wiki/Gizmo5" target="_blank">Gizmo</a>, or any other similar providers, <em>(priced around 10 &#8211; 20 $)</em>. (<a href="http://www.callcentric.com/" target="_blank">Callcentric</a>, <a href="http://www.voxalot.com/" target="_blank">Voxalot</a>)</li>
<li><strong>Get a free US number from <a href="http://www.ipkall.com/" target="_blank">IPKall</a> (forwarded to Gizmo or any other VoIP service) that can be added to Google Voice signup.</strong></li>
</ol>
<p><strong><span style="text-decoration: underline;">How to connect this with Gizmo?</span></strong></p>
<ul>
<li>Register for a free <a href="http://en.wikipedia.org/wiki/Gizmo5" target="_blank">Gizmo</a> account and get your Gizmo number (which is a SIP number, that can be used on any SIP client, on PC, on mobiles, on ATA devices)</li>
<li>Add your Gizmo number in your Google Voice settings page.</li>
<li>Add your Google Voice number in your <a href="http://en.wikipedia.org/wiki/Gizmo5" target="_blank">My Gizmo</a> page.</li>
</ul>
<p><strong><span style="text-decoration: underline;">What I have got now?</span></strong></p>
<ul>
<li>I have a Gizmo account I can add to any SIP enabled device.</li>
<li>I have a IPKall number which is also a US phone number forwarded to my Gizmo account, but I&#8217;m not going to use that at all.</li>
<li>I have a Google Voice number (thats what we wanted to have&#8230;!).</li>
<li>Any one can call my US number 540-IM<strong>N-IMAL</strong> (540-466-4625), and it will ring in my Gizmo phones, SIP applications or any other device. Its free for me.</li>
<li>I can call any US (&amp; Canada?) numbers for free, (at least for 3 minutes).</li>
</ul>
<p>Thats how I got my nice Google Voice number. I&#8217;m ready to help you if you want to get your own Google Voice number, just leave a comment.</p>
<p><strong><span style="text-decoration: underline;">Further Reading:</span></strong></p>
<ol>
<li><a href="http://www.gizmovoice.com/" target="_blank">Gizmo Voice &#8211; A mashup using Gizmo5 and Google Voice</a></li>
<li>Adding a Gizmo number to Google Voice</li>
<li><a href="http://en.wikipedia.org/wiki/Gizmo5" target="_blank">Taking calls from Gizmo</a></li>
<li><a href="http://en.wikipedia.org/wiki/Google_Voice" target="_blank">Google Voice from Wikipedia</a></li>
</ol>
<p><a href="http://nimal.info/blog/2009/free-calls-to-us-using-google-voice-gizmo/">Free calls to US using Google Voice &#038; Gizmo (with IPKall or a Friend in US)</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></content:encoded>
			<wfw:commentRss>http://nimal.info/blog/2009/free-calls-to-us-using-google-voice-gizmo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using the &#8216;exclude&#8217; option with &#8216;tar&#8217;</title>
		<link>http://nimal.info/blog/2009/using-the-exclude-option-with-tar/</link>
		<comments>http://nimal.info/blog/2009/using-the-exclude-option-with-tar/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:15:00 +0000</pubDate>
		<dc:creator>Nimal</dc:creator>
				<category><![CDATA[Tech Notes]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://nimal.info/blog/?p=128</guid>
		<description><![CDATA[<p>The meanings of --exclude and --exclude-from are always confusing to me. I'm always confused with the use of 'exclude' options with 'tar'. <a href="http://nimal.info/blog/2009/using-the-exclude-option-with-tar/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><a href="http://nimal.info/blog/2009/using-the-exclude-option-with-tar/">Using the &#8216;exclude&#8217; option with &#8216;tar&#8217;</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m always confused with the use of &#8216;exclude&#8217; options with &#8216;tar&#8217;. Here I&#8217;m sharing a few tips I found online, just in case it might help you. The meanings of &#8211;exclude and &#8211;exclude-from are always confusing:</p>
<ul>
<li>Use <strong>&#8211;exclude</strong> when files to be excluded are given as a pattern on the command line.</li>
<li>Use <strong>&#8211;exclude-from</strong> to introduce the name of a file which contains a list of patterns, one per line; each of these patterns can exclude zero, one, or many files.</li>
</ul>
<p>When using &#8211;exclude=<em>pattern</em>, be sure to quote the <em>pattern</em> parameter, so GNU tar sees wildcard characters like &#8216;*&#8217;.</p>
<p>For example, write:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-c</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">&lt;</span>em<span style="color: #000000; font-weight: bold;">&gt;</span>archive.tar<span style="color: #000000; font-weight: bold;">&lt;/</span>em<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">--exclude</span> <span style="color: #ff0000;">'*.o'</span> <span style="color: #000000; font-weight: bold;">&lt;</span>em<span style="color: #000000; font-weight: bold;">&gt;</span>directory<span style="color: #000000; font-weight: bold;">&lt;/</span>em<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p><em></em>tar does not act on a path name explicitly listed on the command line if one of its file name components is excluded. If files that end with &#8216;*.o&#8217; are excluded when creating an archive, but explicitly name the file &#8216;dir.o/foo&#8217; after all the options have been listed, &#8216;dir.o/foo&#8217; will be excluded from the archive.<br />
Only shell syntax, or globbing will work with exclude options in tar. The command might fail if regexp syntax is used to describe files to be excluded in the command.</p>
<p><strong><em>Reference:</em></strong></p>
<ul>
<li><a href="http://www.linuxtopia.org/online_books/linux_tool_guides/tar_user_guide/problems-with-exclude.html" target="_blank">GNU tar User Guide &#8211; problems with exclude</a></li>
</ul>
<p><a href="http://nimal.info/blog/2009/using-the-exclude-option-with-tar/">Using the &#8216;exclude&#8217; option with &#8216;tar&#8217;</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></content:encoded>
			<wfw:commentRss>http://nimal.info/blog/2009/using-the-exclude-option-with-tar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Being Nice on a Linux Box &#8211; Process priority with &#8216;nice&#8217; &amp; &#8216;renice&#8217;</title>
		<link>http://nimal.info/blog/2009/process-priority-with-nice-renice/</link>
		<comments>http://nimal.info/blog/2009/process-priority-with-nice-renice/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 04:48:00 +0000</pubDate>
		<dc:creator>Nimal</dc:creator>
				<category><![CDATA[Tech Notes]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://nimal.info/blog/?p=125</guid>
		<description><![CDATA[<p>VirtualBox can be given higher priority using nice command. Also renice command can be used to change the priority of a running process. <a href="http://nimal.info/blog/2009/process-priority-with-nice-renice/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><a href="http://nimal.info/blog/2009/process-priority-with-nice-renice/">Being Nice on a Linux Box &#8211; Process priority with &#8216;nice&#8217; &#038; &#8216;renice&#8217;</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></description>
			<content:encoded><![CDATA[<p><em><strong>Problem (I had): </strong></em>Wanted to run a VirtualBox on a RHEL 4.7 Linux server which is shared by someothers. But as some other processes took more CPU, the VirtualBox performance was bad. So I wanted to increase the priority given to VirtualBox.</p>
<p><em><strong>Solution (I found):</strong></em> VirtualBox can be given higher priority using <strong><tt>nice</tt></strong> command. Also <strong><tt>renice</tt></strong> command can be used to change the priority of a running process, which will also be useful.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nice</span> <span style="color: #660033;">-10</span> VBoxHeadless</pre></div></div>

<p>Gives the VBoxHeadless process 1.5 times priority than the normal process, calculated as (20 &#8211; -10)/20 = 1.5</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nice</span> <span style="color: #660033;">-20</span> <span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

<p>Executes <em>make</em> at maximum priority.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">renice +<span style="color: #000000;">20</span> <span style="color: #000000;">2222</span></pre></div></div>

<p>Changes the priority of process 2222 to +20 (minimum priority).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">renice <span style="color: #660033;">-10</span> <span style="color: #660033;">-p</span> <span style="color: #000000;">13013</span></pre></div></div>

<p>Changes the priority of a running process by specifying its process ID, where priority can be,</p>
<ul>
<li>1 to 20 :Â Runs the specified processes slower than the base priority.</li>
<li>0 :Â Sets priority of the specified processes to the base scheduling priority.</li>
<li>-20 to -1 :Â Runs the specified processes quicker than the base priority.</li>
</ul>
<h3>References and further reading:</h3>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Nice_%28Unix%29" target="_blank">nice (Unix)</a></li>
<li><a href="http://www.oreillynet.com/linux/cmd/cmd.csp?path=n/nice" target="_blank">Linux Command Directory: nice</a></li>
<li> <a href="http://www.oreillynet.com/linux/cmd/cmd.csp?path=r/renice" target="_blank">Linux Command Directory: renice</a></li>
</ul>
<p><a href="http://nimal.info/blog/2009/process-priority-with-nice-renice/">Being Nice on a Linux Box &#8211; Process priority with &#8216;nice&#8217; &#038; &#8216;renice&#8217;</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></content:encoded>
			<wfw:commentRss>http://nimal.info/blog/2009/process-priority-with-nice-renice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell &#8211; How to get surrounding lines of grep result?</title>
		<link>http://nimal.info/blog/2009/shell-how-to-get-surrounding-lines-of-grep-result/</link>
		<comments>http://nimal.info/blog/2009/shell-how-to-get-surrounding-lines-of-grep-result/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 06:52:00 +0000</pubDate>
		<dc:creator>Nimal</dc:creator>
				<category><![CDATA[Tech Notes]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://nimal.info/blog/?p=121</guid>
		<description><![CDATA[<p>Problem:I&#39;m using grep to search for an error and want to display the surrounding lines also as they contain related information. How to do that? Solution:Using grep -C &#60;# of lines to show above and below&#62; &#60;search&#62; &#60;file&#62; The following &#8230; <a href="http://nimal.info/blog/2009/shell-how-to-get-surrounding-lines-of-grep-result/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><a href="http://nimal.info/blog/2009/shell-how-to-get-surrounding-lines-of-grep-result/">Shell &#8211; How to get surrounding lines of grep result?</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></description>
			<content:encoded><![CDATA[<p><u><b>Problem:</b></u><br />I&#39;m using grep to search for an error and want to display the surrounding lines also as they contain related information. How to do that?</p>
<p><u><b>Solution:</b></u><br />Using <b>grep -C &lt;# of lines to show above and below&gt; &lt;search&gt; &lt;file&gt;</b></p>
<p>The following prints the matched line, along with the 5 lines surrounding it.
<pre>$ grep -C 5 &quot;search&quot; sample_text</pre>
<p>Also we can use grep -A or -B to display number of lines above or below the matched line.</p>
<p>The following prints the matched line, along with the 5 lines after it.
<pre>$ grep -A 5 &quot;search&quot; sample_text</pre>
<p>The following prints the matched line, along with the 5 lines before it.
<pre>$ grep -B 5 &quot;search&quot; sample_text</pre>
<p><u><i>Reference:</i></u>
<ul>
<li style="font-family: courier new,monospace;">man grep</li>
<li><a href="http://www.commandlinefu.com/commands/view/279/live-filter-a-log-file-using-grep-and-show-x-of-lines-above-and-below"> Live filter a log file using grep and show x# of lines above and below</a></li>
</ul>
<p><a href="http://nimal.info/blog/2009/shell-how-to-get-surrounding-lines-of-grep-result/">Shell &#8211; How to get surrounding lines of grep result?</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></content:encoded>
			<wfw:commentRss>http://nimal.info/blog/2009/shell-how-to-get-surrounding-lines-of-grep-result/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

