<?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"
	>

<channel>
	<title>Axe.IT blog</title>
	<atom:link href="http://blog.kirves.pri.ee/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kirves.pri.ee</link>
	<description>IT related articles by me</description>
	<pubDate>Sat, 06 Jun 2009 23:11:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>LPT programming example in C for ubuntu linux</title>
		<link>http://blog.kirves.pri.ee/2009/03/lpt-programming-example-in-c-for-ubuntu-linux/</link>
		<comments>http://blog.kirves.pri.ee/2009/03/lpt-programming-example-in-c-for-ubuntu-linux/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 22:17:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[example]]></category>

		<category><![CDATA[led]]></category>

		<category><![CDATA[lpt]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.kirves.pri.ee/?p=116</guid>
		<description><![CDATA[I wanted to try out LPT printer port programming for upcoming other project. After hours of learning and searching, I came up with this piece of code.
#include &#60;stdio.h&#62;
#include &#60;stdlib.h&#62;
#include &#60;unistd.h&#62;
#include &#60;sys/io.h&#62;
#include &#60;sys/types.h&#62;
#include &#60;fcntl.h&#62;

#define BASEPORT 0x378 /* lp1 */

int main()
{
  char c;
  int n, tem;

   printf("Hit enter to stop\n");

  if (ioperm(BASEPORT, [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to try out LPT printer port programming for upcoming other project. After hours of learning and searching, I came up with this piece of code.</p>
<pre>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;unistd.h&gt;
#include &lt;sys/io.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;fcntl.h&gt;

#define BASEPORT 0x378 /* lp1 */

int main()
{
  char c;
  int n, tem;

   printf("Hit enter to stop\n");

  if (ioperm(BASEPORT, 3, 1)) {perror("ioperm"); exit(1);}

  tem = fcntl(0, F_GETFL, 0);
  fcntl (0, F_SETFL, (tem | O_NDELAY));

  while (1) {
    n = read(0, &amp;c, 1);
    if (n &gt; 0) break;

     outb(255, BASEPORT);
     usleep(250000);
     outb(0, BASEPORT);
     usleep(250000);
  }

  fcntl(0, F_SETFL, tem);
  outb(0, BASEPORT);

  if (ioperm(BASEPORT, 3, 0)) {perror("ioperm"); exit(1);}

  exit(0);

}</pre>
<p>I compiled it with command where lpt.c is source code and lpt is program name compiled.</p>
<p><strong>gcc lpt.c -O2 -o lpt</strong></p>
<p>I used LED with 550 ohms resistor in series and soldered it between pin 2 and 20 to test out this program.</p>
<p><a href="http://blog.kirves.pri.ee/wp-content/uploads/2009/03/lpt_led_blinking.jpg"><img class="alignnone size-medium wp-image-112" title="LPT with led" src="http://blog.kirves.pri.ee/wp-content/uploads/2009/03/lpt_led_blinking-300x280.jpg" alt="" width="300" height="280" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kirves.pri.ee/2009/03/lpt-programming-example-in-c-for-ubuntu-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to move thunderbird profile from windows to (k)ubuntu</title>
		<link>http://blog.kirves.pri.ee/2008/12/how-to-move-thunderbird-profile-windows-to-kubuntu/</link>
		<comments>http://blog.kirves.pri.ee/2008/12/how-to-move-thunderbird-profile-windows-to-kubuntu/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 09:55:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[account]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[mail]]></category>

		<category><![CDATA[moving]]></category>

		<category><![CDATA[profile]]></category>

		<category><![CDATA[thunderbird]]></category>

		<category><![CDATA[ununtu]]></category>

		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://blog.kirves.pri.ee/?p=100</guid>
		<description><![CDATA[I finally have kubuntu (8.10) at work and happy about it. So ofcourse I needed to import my thunderbird profile from windows to kubuntu also. Like always, I had forgot how to do that and where profiles are kept. It is quite easy- this is how I did it. Note this is for one profile(default). [...]]]></description>
			<content:encoded><![CDATA[<p>I finally have kubuntu (8.10) at work and happy about it. So ofcourse I needed to import my thunderbird profile from windows to kubuntu also. Like always, I had forgot how to do that and where profiles are kept. It is quite easy- this is how I did it. Note this is for one profile(default). I don&#8217;t know is there something very special to take account when dealing with multiple profiles. Probably profiles.ini file must have those other profiles sections also.</p>
<p><strong>1.</strong> I located where is my profile at windows machine. In my case I found it</p>
<blockquote><p><strong>Q:\Documents and Settings\my_win_username\Application Data\Thunderbird\Profiles\</strong></p></blockquote>
<p>There was folder named something like <strong>ks7f7j02.default </strong>with random hash at beginning.That was my profile.</p>
<p><strong>2:</strong> I located profiles folder in my kubuntu 8.10, I found it at</p>
<blockquote><p><strong>/home/my_linux_username/.mozilla-thunderbird/</strong></p></blockquote>
<p><strong>3. </strong>I copied my profile folder with same name in there.</p>
<p><strong>4. </strong>I opened file</p>
<blockquote><p><strong>/home/my_linux_username/.mozilla-thunderbird/profiles.ini</strong></p></blockquote>
<p>I cant remember what was there before, but I eventually it contained these lines.</p>
<blockquote><p>[General]<br />
StartWithLastProfile=1</p>
<p>[Profile0]<br />
Name=default<br />
IsRelative=1<br />
Path=<strong>ks7f7j02.default</strong></p></blockquote>
<p>Where <strong>Path=</strong> is important. You must type your profiles folder name there.</p>
<p>After this I started my thunderbird and I had my account setup in linux. Also it might alert error something like unable to find binary component. This is produced by thunderbird because it does not find your plugins that might be installed when you worked with windows.</p>
<p><strong>In first comment is a much better solution for it. Just copy the all thing. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kirves.pri.ee/2008/12/how-to-move-thunderbird-profile-windows-to-kubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My first wordpress plugin</title>
		<link>http://blog.kirves.pri.ee/2008/09/my-first-wordpress-plugin/</link>
		<comments>http://blog.kirves.pri.ee/2008/09/my-first-wordpress-plugin/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 11:01:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[sidebar]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.kirves.pri.ee/?p=88</guid>
		<description><![CDATA[Just a day ago I finished my first wordpress plugin. I was unable to find plugin wich trough I could add sontent realted to current post into sidebar widget. So I desided to write my own little plugin. It was needed in my other blog, but now I installed it here already too. Anyway, if [...]]]></description>
			<content:encoded><![CDATA[<p>Just a day ago I finished my first wordpress plugin. I was unable to find plugin wich trough I could add sontent realted to current post into sidebar widget. So I desided to write my own little plugin. It was needed in my other <a href="http://kirves.pri.ee">blog</a>, but now I installed it here already too. Anyway, if you are interested check it out <a href="/some-works/wp-plugin-ax-sidebar/">here</a>. I sure like it already. Maybe I make it better someday.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kirves.pri.ee/2008/09/my-first-wordpress-plugin/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
