<?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>lamehacks</title>
	<atom:link href="http://lamehacks.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://lamehacks.com/blog</link>
	<description>Stuff is fun</description>
	<lastBuildDate>Sun, 30 May 2010 15:05:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>perl sudoku revisited</title>
		<link>http://lamehacks.com/blog/perl-sudoku-revisited/</link>
		<comments>http://lamehacks.com/blog/perl-sudoku-revisited/#comments</comments>
		<pubDate>Sun, 30 May 2010 15:05:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[per]]></category>
		<category><![CDATA[puzzle]]></category>
		<category><![CDATA[sudoku]]></category>

		<guid isPermaLink="false">http://lamehacks.com/blog/?p=131</guid>
		<description><![CDATA[My lame sudoku solving script can now be use in a more intuitive way through an html form. I kept it retro-compatible so the old url interface can still be used. I also implemented initial rule checking to prevent invalid puzzles from causing weird results.
Source is hosted at bitbucket.  Social code hosting is cool, from [...]]]></description>
			<content:encoded><![CDATA[<p>My lame <a href="http://lamehacks.com/blog/solving-sudoku-puzzles-with-perl/">sudoku solving script</a> can now be use in a more intuitive way <a href="http://lamehacks.com/sudoku/sudoku.pl" target="_blank">through an html form</a>. I kept it retro-compatible so the old url interface can still be used. I also implemented initial rule checking to prevent invalid puzzles from causing weird results.</p>
<p><a href="https://bitbucket.org/plainas/sudoku/src/tip/sudoku.pl" target="_blank">Source</a> is hosted at bitbucket.  Social code hosting is cool, from now on all my code bits will be pushed to bitbucket.</p>
]]></content:encoded>
			<wfw:commentRss>http://lamehacks.com/blog/perl-sudoku-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javacus &#8211; A java abacus</title>
		<link>http://lamehacks.com/blog/javacus-a-java-abacus/</link>
		<comments>http://lamehacks.com/blog/javacus-a-java-abacus/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 01:26:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://lamehacks.com/blog/?p=105</guid>
		<description><![CDATA[I was in the middle of the process of making a toy abacus when my workshop got flooded, so I put together this lame electronic replacement

I made this for fun and that&#8217;s probably one of the very few purposes it can have.
Since I have your attention, I&#8217;ll take the chance to demystify  some urban [...]]]></description>
			<content:encoded><![CDATA[<p>I was in the middle of the process of making a toy abacus when my workshop got flooded, so I put together this lame electronic replacement<span id="more-105"></span></p>
<p><a href="http://lamehacks.com/blog/wp-content/uploads/2010/03/javacusScreenshot.png"><img class="alignnone size-medium wp-image-118" title="javacusScreenshot" src="http://lamehacks.com/blog/wp-content/uploads/2010/03/javacusScreenshot-300x161.png" alt="Javacus Screenshot" width="300" height="161" /></a></p>
<p>I made this for fun and that&#8217;s probably one of the very few purposes it can have.</p>
<p>Since I have your attention, I&#8217;ll take the chance to demystify <span id="result_box" class="short_text"><span style="background-color: #ffffff;" title="desmistificar"> </span></span>some urban myths about the abacus:</p>
<p>1. The abacus is not an advanced nor complex mathematical device.  It&#8217;s a simple tool wich aids you keeping track of calculus that YOU make in your head.<br />
The japanese abacus is called <em>soroban</em> which means <em>counting board</em>.</p>
<p>2.There are reports of abacus&#8217; being faster than electronic calculators.  Those are silly. They make as much sense as comparing a car to a tire.  An abacus does not make any actual calculus, a calculator does.<br />
Such reports often refer to a <a href="http://www.ee.ryerson.ca/~elf/abacus/abacus-contest.html" target="_blank">contest held in Tokyo on 1946</a>. That contest oposed the speed of operation of both devices, not their calculator capabilities which are not comparable.</p>
<p>Now, on to the download.<br />
I hosted it at <a href="http://bitbucket.org/plainas/javacus/overview/">bitbucket</a>, check out the <a href="http://bitbucket.org/plainas/javacus/downloads/">download</a> section.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 133px; width: 1px; height: 1px; overflow: hidden;"><span id="result_box" class="short_text"><span style="background-color: #ffffff;" title="desmistificar">demystify</span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://lamehacks.com/blog/javacus-a-java-abacus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back online at lamehacks.com</title>
		<link>http://lamehacks.com/blog/back-online-at-lamehackscom/</link>
		<comments>http://lamehacks.com/blog/back-online-at-lamehackscom/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 01:35:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[domain name]]></category>

		<guid isPermaLink="false">http://lamehacks.com/blog/?p=101</guid>
		<description><![CDATA[Just like any cool website, this lame blog went through a domain move*. What can beat &#8220;I forgot to pay the domain name&#8221; in coolness? I&#8217;ll go with that!
Expect links to be broken and other malfunction, eventually I&#8217;ll fix them.
]]></description>
			<content:encoded><![CDATA[<p>Just like any cool website, this lame blog went through a domain move<a href="http://www.fravia.com/nomomen.htm" target="_blank">*</a>. What can beat &#8220;<em>I forgot to pay the domain name</em>&#8221; in coolness? I&#8217;ll go with that!</p>
<p>Expect links to be broken and other malfunction, eventually I&#8217;ll fix them.</p>
]]></content:encoded>
			<wfw:commentRss>http://lamehacks.com/blog/back-online-at-lamehackscom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beautify [Format] XML with PHP</title>
		<link>http://lamehacks.com/blog/beautify-format-xml-with-php/</link>
		<comments>http://lamehacks.com/blog/beautify-format-xml-with-php/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 01:14:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://lamehacks.net/?p=92</guid>
		<description><![CDATA[There is a myriad of XML formating tools out there, some have reached a rather stable development state. Oddly enough, an XML file having elements with both content and child elements is all it takes for most  of them them [every single one i know of] to miserably fail.  Being that a basic XML feature, [...]]]></description>
			<content:encoded><![CDATA[<p>There is a myriad of XML formating tools out there, some have reached a rather stable development state. Oddly enough, an XML file having elements with both content and child elements is all it takes for most  of them them [every single one i know of] to miserably fail.  Being that a basic XML feature, I decided to give it a go.</p>
<p><span id="more-92"></span>It was pretty straight forward&#8230;</p>
<pre>function beautify($xmlString){

 $outputString = "";
 $previousBitIsCloseTag = false;
 $indentLevel = 0;
 $bits = explode("<", $xmlString);

 foreach($bits as $bit){

  $bit = trim($bit);
  if (!empty($bit)){

   if ($bit[0]=="/"){ $isCloseTag = true; }
   else{ $isCloseTag = false; }

   if(strstr($bit, "/>")){
    $prefix = "\n".str_repeat(" ",$indentLevel);
    $previousBitIsSimplifiedTag = true;
   }
   else{
    if ( !$previousBitIsCloseTag and $isCloseTag){
     if ($previousBitIsSimplifiedTag){
      $indentLevel--;
      $prefix = "\n".str_repeat(" ",$indentLevel);

     }
     else{
      $prefix = "";
      $indentLevel--;
     }
    }
    if ( $previousBitIsCloseTag and !$isCloseTag){$prefix = "\n".str_repeat(" ",$indentLevel); $indentLevel++;}
    if ( $previousBitIsCloseTag and $isCloseTag){$indentLevel--;$prefix = "\n".str_repeat(" ",$indentLevel);}
    if ( !$previousBitIsCloseTag and !$isCloseTag){{$prefix = "\n".str_repeat(" ",$indentLevel); $indentLevel++;}}
    $previousBitIsSimplifiedTag = false;
   }

   $outputString .= $prefix."<".$bit;

   $previousBitIsCloseTag = $isCloseTag;
  }
 }
 return $outputString;
}</pre>
<p><strong>Note:</strong><br />
I totally forgot CDATA handling. Maybe that's a good subject to some other post. Maybe, if I happen to need that feature.</p>
]]></content:encoded>
			<wfw:commentRss>http://lamehacks.com/blog/beautify-format-xml-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make a slingshot</title>
		<link>http://lamehacks.com/blog/how_to_make_slingshot/</link>
		<comments>http://lamehacks.com/blog/how_to_make_slingshot/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 00:33:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Revival]]></category>
		<category><![CDATA[balistics]]></category>
		<category><![CDATA[hardware hacks]]></category>
		<category><![CDATA[fisga]]></category>
		<category><![CDATA[slingshot]]></category>

		<guid isPermaLink="false">http://lamehacks.net/?p=79</guid>
		<description><![CDATA[This is an absolute classic. One of the oldest toys,  it&#8217;s also one of the oldest hunting weapons in use and a biblical object. I still have my old slingshot my father made me more than 20 years ago.  Slingshots have been used all over the world with minor variants. This is how they are [...]]]></description>
			<content:encoded><![CDATA[<p>This is an absolute classic. One of the oldest toys,  it&#8217;s also one of the oldest hunting weapons in use and a biblical object. I still have my old slingshot my father made me more than 20 years ago.  Slingshots have been used all over the world with minor variants. This is how they are made in south of Europe, in particular in Portugal where I was born.<span id="more-79"></span></p>
<h3>Materials</h3>
<ul>
<li><strong>A knife</strong>, that&#8217;s the only tool you&#8217;ll need, a saw might come in hand to cut the wood, otherwise use the knife to make the wood thinner in the spot where you would cut and then break it.</li>
<li><strong>A Y-shaped piece of wood</strong>. Around here, this would typically be a piece of olive, I happen to have a lot of Willow around.</li>
<li><strong>An old shoe </strong>or any other thing made of leather that you don&#8217;t want to keep</li>
<li><strong>A car tire inner tube</strong>. This does the job but is not the real thing.  Inner tubes are made of a blend of rubber and synthetic materials these days, 100% rubber would be better. You&#8217;ll probably want to <a href="http://shop.ebay.com/?&amp;_nkw=slingshot+band" target="_blank">check out rubber bands on ebay</a> or buy some latex tube.</li>
</ul>
<p><a href="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6000.jpg"><img class="size-full wp-image-68 alignnone" title="Slingshot Materials" src="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6000.jpg" alt="Materials" width="448" height="336" /></a></p>
<h3>Assembly instructions</h3>
<ol>
<li>Shape the wood piece as shown in the picture. Mine was way too thick, I had to made it thinner with the knife. Notice the special shapes next by the top tips, they&#8217;ll make thing easier later on.<br />
<a href="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6909.jpg"><img class="alignnone size-medium wp-image-69" title="Finished wood piece" src="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6909-300x225.jpg" alt="Finished wood piece" width="300" height="225" /></a></li>
<li>From the inner tube, cut two bands about 1cm wide and 50cm long. Also, make four small strings to tight things together later.<br />
<a href="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6914.jpg"><img class="alignnone size-medium wp-image-71" title="Inner tube cut" src="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6914-300x225.jpg" alt="Inner tube cut" width="300" height="225" /></a><a href="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6916.jpg"><br />
<img class="alignnone size-medium wp-image-72" title="Ready rubber bands and strings" src="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6916-300x225.jpg" alt="Ready rubber bands and strings" width="300" height="225" /></a><br />
Some company makes the whole thing a lot more enjoyable<br />
<a href="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6917.jpg"><img class="alignnone size-medium wp-image-73" title="Ruca" src="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6917-300x225.jpg" alt="Ruca" width="300" height="225" /></a></li>
<li>Extract a piece of leather from some evil shoe&#8230;<br />
<a href="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6924.jpg"><img class="alignnone size-medium wp-image-74" title="Shoe cut" src="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6924-300x225.jpg" alt="Shoe cut" width="300" height="225" /></a></p>
<p>&#8230; hack away some corners and cut some holes, the final result should look like this<br />
<a href="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6925.jpg"><img class="alignnone size-medium wp-image-75" title="leather" src="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6925-300x225.jpg" alt="leather" width="300" height="225" /></a></li>
<li>Tight everything together with the rubber strings. 50cm is rather much for an usable slingshot, feel the size of the rubber bands and cut them a size you feel comfortable with<br />
<a href="http://lamehacks.net/wp-content/uploads/2009/04/dscn6926.jpg"><img class="alignnone size-medium wp-image-76" title="knot" src="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6926-300x225.jpg" alt="knot" width="300" height="225" /></a></li>
<li>Finally, just a cosmetic touch, cut away loose strings<br />
<a href="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6927.jpg"><img class="alignnone size-medium wp-image-77" title="trim ends" src="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6927-300x225.jpg" alt="trim ends" width="300" height="225" /></a></li>
</ol>
<h3>Final result</h3>
<p>Hurray! You got yourself a slingshot. If you have never used one, you&#8217;ll be surprise by its awesome accuracy.</p>
<p><a href="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6928.jpg"><img class="alignnone size-medium wp-image-78" title="Final result" src="http://lamehacks.com/blog/wp-content/uploads/2009/04/dscn6928-300x225.jpg" alt="Final result" width="300" height="225" /></a><br />
With the amount of crazy (crazy as in lack of sense) stuff thrown on TV claiming an apocalyptic economical crisis, don&#8217;t get surprised if a slingshot pops up as a reliable/cheap way of getting food (birds, rabbits, etc). In the mean time I would recommend its usage purely for fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://lamehacks.com/blog/how_to_make_slingshot/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tennis Ball Mortar&#8230; FAIL!</title>
		<link>http://lamehacks.com/blog/tennis-ball-mortar-fail/</link>
		<comments>http://lamehacks.com/blog/tennis-ball-mortar-fail/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 11:34:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[balistics]]></category>
		<category><![CDATA[hardware hacks]]></category>
		<category><![CDATA[acetone]]></category>
		<category><![CDATA[mortar]]></category>
		<category><![CDATA[spudgun]]></category>
		<category><![CDATA[tennis ball mortar]]></category>
		<category><![CDATA[tin can mortar]]></category>

		<guid isPermaLink="false">http://lamehacks.net/?p=64</guid>
		<description><![CDATA[This as a quick attempt to build a simple ghetto tennis ball mortar out or tin cans and duct tape.

One can for the combustion chamber and two for the barrel. The damn thing didn&#8217;t work. It was hard to ignite and when it did ignite, many flames came through the barrel without lifting the tennis [...]]]></description>
			<content:encoded><![CDATA[<p>This as a quick attempt to build a simple ghetto tennis ball mortar out or tin cans and duct tape.<span id="more-64"></span></p>
<p><img class="alignnone size-full wp-image-65" title="Tenis Ball Mortar" src="http://lamehacks.com/blog/wp-content/uploads/2009/04/img_0383.jpg" alt="Tenis Ball Mortar" width="500" height="375" /></p>
<p>One can for the combustion chamber and two for the barrel. The damn thing didn&#8217;t work. It was hard to ignite and when it did ignite, many flames came through the barrel without lifting the tennis ball. I guess the combustion chamber was too small&#8230; bummer!</p>
<p>In a desperate attempt of getting some fun out of this lame mortar I blocked the top of the barrel  with a ball of newspaper wrapped in  tape. In other words, I incresed the combustion chamber length b a factor of three and removed the barrel. Then I had absolutely no troubles with ignition and shots popped quite loud.</p>
<p>I used acetone as fuel, its not so good. Too irregular explosions, also, it eveporates too fast.</p>
]]></content:encoded>
			<wfw:commentRss>http://lamehacks.com/blog/tennis-ball-mortar-fail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Potato Cannon safety</title>
		<link>http://lamehacks.com/blog/potato-cannon-safety/</link>
		<comments>http://lamehacks.com/blog/potato-cannon-safety/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 13:59:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[balistics]]></category>
		<category><![CDATA[hardware hacks]]></category>
		<category><![CDATA[potato cannon]]></category>
		<category><![CDATA[potato gun]]></category>
		<category><![CDATA[safety]]></category>
		<category><![CDATA[spudgun]]></category>

		<guid isPermaLink="false">http://lamehacks.net/?p=51</guid>
		<description><![CDATA[After the last post I had some people asking me if potato cannons are dangerous. They sure are if used without caution. These are some basic yet important safety measures I put together in order to keep myself safe. I&#8217;ll explain as I go through, knowledge is in fact the best safety.

-Use thick high pressure [...]]]></description>
			<content:encoded><![CDATA[<p>After the last post I had some people asking me if potato cannons are dangerous. They sure are if used without caution. These are some basic yet important safety measures I put together in order to keep myself safe. I&#8217;ll explain as I go through, knowledge is in fact the best safety.<br />
<span id="more-51"></span><br />
-Use thick high pressure PVC or ABS tubes. Those can stand pressure many times greater than that caused by an explosion of a mixture of hair-spray and air. If you want you can wrap the combustion chamber in tape, but it&#8217;s basically impossible for high pressure tube to explode with a hair-spray explosion.</p>
<p>-Do not spay large amounts of fuel in the chamber. Despite what may look obvious, that won&#8217;t cause bigger explosions nor greater shoot ranges. It will in fact result in smaller explosions. The combustion is a chemical reaction in which both fuel and oxygen are combined into other gases. By inserting too much fuel in the chamber you&#8217;ll create an unbalanced mixture that will consume the little oxygen faster, therefore causing a smaller explosion.<br />
If the oxygen runs out to quick, only a part of the hair spray will burn. Then, when you open the chamber after a shot, you will provide it the oxygen it needs and run into the risk of another explosion outside the cannon.</p>
<p>-Never play around with the ignition device. It should be used strictly to fire the cannon in a controlled way.</p>
<p>-Never look into the barrel or the chamber. If you need to fix something inside the cannon, don&#8217;t do it during a firing session.</p>
<p>-Never point the cannon at anybody even when it&#8217;s supposedly not loaded. Stupidity is not the way to go if you want to be safe.</p>
<p>-Always store your cannon unloaded and with the chamber open so air can flow into it. Testimonials exist that people accidental ignited old fuel that was left in the chamber or other gases released from the PVC cement or other chemical products.</p>
<p>-Be aware of uncontrolled ignition sources like cigarettes and light buttons. Since the cannon is made of plastic you need to be careful as it can create static electricity from friction with clothes which can lead to sparkles.</p>
<p>-Do not experiment with unknown fuels, you don&#8217;t know what can happen.</p>
<p>-Do not experiment with oxidizing agents. A home came cannon is not the kind of equipment to be used with such combustions.</p>
<p>Besides these there are other good practices that I can&#8217;t think of at the moment. In the end the most important is to have good knowledge on what you&#8217;re doing and use your common sense.<br />
Be safe, potato canons are fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://lamehacks.com/blog/potato-cannon-safety/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Potato Cannon</title>
		<link>http://lamehacks.com/blog/potato_cannon/</link>
		<comments>http://lamehacks.com/blog/potato_cannon/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 05:00:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[balistics]]></category>
		<category><![CDATA[hardware hacks]]></category>
		<category><![CDATA[potato cannon]]></category>
		<category><![CDATA[potato gun]]></category>
		<category><![CDATA[spudgun]]></category>

		<guid isPermaLink="false">http://lamehacks.net/?p=46</guid>
		<description><![CDATA[Warning: This is dangerous. Do not go and try this at home without propper security and knowledge. You will likely hurt yourself or others very badly.
A few days ago I told a friend of mine about these fun things I saw on the internet,  potato cannons. The day after he showed up at my place [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong><span style="color: #ff0000;">Warning:</span> </strong>This is dangerous. Do not go and try this at home without propper security and knowledge. You will likely hurt yourself or others very badly.</em></p>
<p>A few days ago I told a friend of mine about these fun things I saw on the internet,  potato cannons. The day after he showed up at my place with a bunch of pipes and other PVC pieces. We went buy one of those long lighters with a piezo crystal and the material checklist was complete. We used an old (10+ years) can of hairspray an fuel.<span id="more-46"></span></p>
<p>We didn&#8217;t follow any particular instructions, we simply built the cannon the way we thought would be efficient. And it worked perfectly, after struggling a bit with the wiring of the ignition sparkle the canon was firing every single time without ever failing.</p>
<p>We didn&#8217;t make so many tests because the wires got ripped off with the recoil of a shot and it was raining, so we didn&#8217;t bother repairing it. Also this was just a prototype&#8230; next one will be more robust and therefore safer.</p>
<p>Here are some pictures:<br />
<a href="http://www.imagebam.com/image/70e43d21993579/" target="_blank"><img src="http://thumbnails2.imagebam.com/2200/70e43d21993579.gif" alt="imagebam.com" /></a> <a href="http://www.imagebam.com/image/981a2621993580/" target="_blank"><img src="http://thumbnails6.imagebam.com/2200/981a2621993580.gif" alt="imagebam.com" /></a> <a href="http://www.imagebam.com/image/83af4621993581/" target="_blank"><img src="http://thumbnails12.imagebam.com/2200/83af4621993581.gif" alt="imagebam.com" /></a> <a href="http://www.imagebam.com/image/22dc2321993582/" target="_blank"><img src="http://thumbnails10.imagebam.com/2200/22dc2321993582.gif" alt="imagebam.com" /></a></p>
<p>At the first sight the combustion chamber looks too long, but that turned out to be very effective. In 95% of the videos I saw out there on the internet, the operator puts way to much fuel on the chamber which ends up powering down the explosion due to lack of oxygen. In order to have a efficient combustion one need a very little volume of hairspray and a rather big volume of air. Thus, a long combustion chamber is good because it keeps a lot of air inside it. I should say that half a second of spray in this cannon results in a damn loud BOOM and a rather powerful shot.</p>
<p>I will make a post covering only security aspects of these things as they are quite dangerous.</p>
]]></content:encoded>
			<wfw:commentRss>http://lamehacks.com/blog/potato_cannon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Archive your tomboy notes</title>
		<link>http://lamehacks.com/blog/archive-tomboy-notes/</link>
		<comments>http://lamehacks.com/blog/archive-tomboy-notes/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 10:48:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[dbus]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tomboy notes]]></category>

		<guid isPermaLink="false">http://lamehacks.net/?p=41</guid>
		<description><![CDATA[Tomboy is my favorite note taking application. It&#8217;s as close as it can get to paper and an pencil. It&#8217;s a relatively new application so new features are still popping up here and there written by many different people. This lame script is my small contribution to this awesome piece of software.
A really cool thing [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://live.gnome.org/Tomboy" target="_blank">Tomboy</a> is my favorite note taking application. It&#8217;s as close as it can get to paper and an pencil. It&#8217;s a relatively new application so new features are still popping up here and there written by many different people. This lame script is my small contribution to this awesome piece of software.<span id="more-41"></span><br />
A really cool thing about tomboy is its <a href="http://www.freedesktop.org/wiki/Software/dbus" target="_blank">dbus</a> <a href="http://arstechnica.com/journals/linux.ars/2007/09/26/using-the-tomboy-d-bus-interface" target="_blank">interface</a>, it allows interaction with tomboy without even looking into the source code.<br />
Unfortunately tomboy doesn&#8217;t come with an archive feature, which means that either you need to keep whatever notes you might one day use in a big messy pile of notes or you delete it and regret it latter. The solution I came up with is simply archiving a snapshot of all my notes in a html file. Tomboy comes with an <em>export to html</em> feature but it only works for single notes. Luckily, if you export a note containing links to other notes, the linked notes will also be included in the same HTML file. That being said, the only thing we need to do is create a not with links to all other notes. Using tomboy&#8217;s dbus interface that&#8217;s a breeze.</p>
<pre>#!/usr/bin/env python
#
#   This script creates a tomboy note containing link to each other note
#   so one can easily export all the notes to an HTML file
#
#	author:Pedro
#
#   Check out lamehacks.net for more lame scripts and stuff

import dbus, time

note_title = "Note Index"

# Get the D-Bus session bus
bus = dbus.SessionBus()

# Access the Tomboy D-Bus object
obj = bus.get_object("org.gnome.Tomboy","/org/gnome/Tomboy/RemoteControl")

# Access the Tomboy remote control interface
tomboy = dbus.Interface(obj, "org.gnome.Tomboy.RemoteControl")

notes_links = ""

for note in tomboy.ListAllNotes():
notes_links += tomboy.GetNoteTitle(note) + " \n"

uri = tomboy.FindNote(note_title)
if uri == "":
uri = tomboy.CreateNamedNote(note_title)

tomboy.SetNoteContents(uri, note_title + "\n\n" + notes_links)
tomboy.DisplayNote(uri)
</pre>
<p>Run this script, a new note called <em>Note index</em> should have been created containng links to every other note. Export it to HTML and sabe it. I used python, but any language having a dbus library can be used.<strong></strong></p>
<p><strong>NOTE:</strong> For some reason sometimes the script needs to be executed twice in order for the contents to be actually placed in the note. I believe this is some bug in Tomboy Notes.</p>
]]></content:encoded>
			<wfw:commentRss>http://lamehacks.com/blog/archive-tomboy-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secure command line chat using netcat and openssl</title>
		<link>http://lamehacks.com/blog/secure-command-line-cha/</link>
		<comments>http://lamehacks.com/blog/secure-command-line-cha/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 00:23:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[netcat]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[shellscript]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://lamehacks.net/?p=36</guid>
		<description><![CDATA[Instant messaging networks are practical and simple to use. Though most of the people use them  without worries, they do in fact bring up a major concern, privacy. Not only your messages are transmitted in plain text over the internet so somebody in between can sniff them, they are not sent directly to the recipient. [...]]]></description>
			<content:encoded><![CDATA[<p>Instant messaging networks are practical and simple to use. Though most of the people use them  without worries, they do in fact bring up a major concern, privacy. Not only your messages are transmitted in plain text over the internet so somebody in between can sniff them, they are not sent directly to the recipient. Instead, they are sent to the IM provider&#8217;s server and then delivered to the recipient. What this means is that you are trusting wharever you communicate over IM to your IM provider which can log all your messages and do whatever it wants with them.</p>
<p>If you use an UNIX based operative system, this little shell script implements a simple and secure way to chat. It&#8217;s more of a proof of concept than a every-day usable script. Despite that is fully functional and fun.<br />
It works simply by sending encrypted text over a TCP socket created with netcat. The text is encrypted using openssh.</p>
<pre>#!/bin/sh

#change this if your port is busy
port=3004

usage () {
	echo "******************** SSSLCHAT ********************"
	echo "U S A G E"
	echo "SERVER: ssslchat.sh server [password]"
	echo "CLIENT: ssslchat.sh client [password] [ip|hostname]"
	exit 1
}

mode=$1
pass=$2
ip_or_host=$3

encode(){

	password=$1

	while [ True ]
	do
		read userinput
		encodedmessage=`echo "$userinput" | openssl enc -rc4 -k $password | openssl enc -a`
		echo "$encodedmessage"
	done
}

decode(){

	password=$1

	while [ True ]
	do
		read encodedinput
		decodedmessage=`echo "$encodedinput" | openssl enc -d -a | openssl enc -d -rc4 -k $password`
		echo "+$decodedmessage"
	done
}

case $mode in
	"server") encode $pass | nc -l -p $port | decode $pass ;;
	"client") encode $pass | nc $ip_or_host $port | decode $pass ;;
	*) usage ;;
esac</pre>
<p>Both the server and the client need to use the same password for it to work.</p>
<p><a href="http://lamehacks.net/wp-content/uploads/2008/11/ssslchat.sh" target="_self">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lamehacks.com/blog/secure-command-line-cha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
