<rss version="2.0">
	<channel>
	<title>PlanetJoel.com</title>
	<link>http://www.planetjoel.com</link>
	<description>All things Joel.</description>
	<generator>PlanetJoel.com custom PHP</generator>
	<!--
	<image>
		<url>http://www.planetjoel.com/graphics/header.gif</url>
		<title>PlanetJoel.com</title>
		<link>http://www.planetjoel.com</link>
		<width>561</width>
		<height>121</height>
	</image>
	-->
	<lastBuildDate>Thu, 11 Mar 2010 10:46:17 +0000</lastBuildDate>
<item>
	<guid isPermaLink="true">http://www.planetjoel.com/viewarticle/632</guid>
	<title>Subversion Pre-Commit hook to check sudoers file syntax</title>
	<author>Joel joelh-website@planetjoelDOTcom</author>
	<pubDate>Tue, 06 Jan 2009 21:32:23 +0000</pubDate>
	<link>http://www.planetjoel.com/viewarticle/632</link>
	<description>
	&lt;br /&gt; &lt;br /&gt;In my short running series extremely obscure pieces of code that hopefully someone else in the universe will find useful I bring you a pre-commit hook for subversion that &lt;a href=&quot;http://www.planetjoel.com/files/pre-commit-sudoers.txt&quot;&gt;checks to make sure your sudoers file has correct syntax&lt;/a&gt;. This is useful for us because we have a very large sudoers file and once commited into subversion it will get deployed to all of our boxes. If it contains a syntax error this would be quite nasty.&lt;/p&gt;

&lt;br /&gt; &lt;br /&gt;While coding it I ran into a fun little bug that means &lt;a href=&quot;http://subversion.tigris.org/issues/show_bug.cgi%3Fid%3D2078&quot;&gt;if you try and print too much to stderr it hangs&lt;/a&gt; which made things a bit more interesting. &lt;/p&gt;

Enjoy
    
	</description>
	<comments>http://www.planetjoel.com/viewarticle/632</comments>
</item><item>
	<guid isPermaLink="true">http://www.planetjoel.com/viewarticle/631</guid>
	<title>lshw</title>
	<author>Joel joelh-website@planetjoelDOTcom</author>
	<pubDate>Sun, 28 Dec 2008 19:56:34 +0000</pubDate>
	<link>http://www.planetjoel.com/viewarticle/631</link>
	<description>
	Every now and then you come across a genuine new command that you haven&#039;t heard of before that does something useful. &lt;a href=&quot;http://ezix.org/project/wiki/HardwareLiSter&quot;&gt;&lt;b&gt;lshw&lt;/b&gt;&lt;/a&gt; lists basically everything hardware related you would want to know about a new box you have just jumped on to. It is extremely detailed and easy to read and should be available with a simple &quot;apt-get install lshw&quot; on either ubuntu or debian. 
    
	</description>
	<comments>http://www.planetjoel.com/viewarticle/631</comments>
</item><item>
	<guid isPermaLink="true">http://www.planetjoel.com/viewarticle/630</guid>
	<title>Flickr-CAPTCHA v0.2 using PHP and the FlickrAPI for human recognition</title>
	<author>Joel joelh-website@planetjoelDOTcom</author>
	<pubDate>Tue, 16 Dec 2008 04:16:29 +0000</pubDate>
	<link>http://www.planetjoel.com/viewarticle/630</link>
	<description>
	&lt;br /&gt; &lt;br /&gt;Flickr-CAPTCHA is a captcha program that uses flickr images and tags
to decide whether someone is human. A random thing is selected (from a
list of things) and a random number of flickr images are chosen
a long with a set of decoys. Each decoy contains at least one other
thing in order to prevent images that are ambigious and to try and keep
it obvious they are decoys. The user must then select all images and
if they get 50% right (with minus marks for wrong answers) we consider
them definitely human. It should be quite difficult for a computer
to guess which images to select but fun and enjoyable for a human. It
requires only very basic english skills. &lt;/p&gt;

&lt;h4&gt;SECURITY&lt;/h4&gt;

&lt;br /&gt; &lt;br /&gt;Image ID&#039;s are hashed then proxied through a PHP page so that a bot
cannot simply lookup the image themselves through the flickr API. They
could potentially use the author and the title so an option exists to
hide the title as well if you are paranoid. You will also want to
adjust the acceptedRatio if you are really paranoid. &lt;/p&gt;

&lt;h4&gt;IMAGE LICENSING&lt;/h4&gt;

&lt;br /&gt; &lt;br /&gt;We are only selecting images that have attribution licenses, not those 
that are all rights reserved. Every image being displayed is attributed
to the author with a link to their flickr page. I am not a lawyer, see
the LICENSE file for warranty (hint: there is none). &lt;/p&gt;

Pros
&lt;ul&gt;
    &lt;li&gt;Fun and easy to use
    &lt;li&gt;Easy for human / hard for computer
    &lt;li&gt;Customizable
&lt;/ul&gt;

Cons
&lt;ul&gt;
    &lt;li&gt;Slow to load all the images
    &lt;li&gt;Not secure
&lt;/ul&gt;

&lt;br /&gt; &lt;br /&gt;To get started check out the &lt;a href=&quot;http://www.planetjoel.com/files/flickr.captcha.README&quot;&gt;README file&lt;/a&gt;&lt;/p&gt;
&lt;br /&gt; &lt;br /&gt;&lt;b&gt;&lt;a href=&quot;http://www.planetjoel.com/files/Flickr-CAPTCHA.0.2.tar.gz&quot;&gt;Download Flickr-CAPTCHA v0.2&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;br /&gt; &lt;br /&gt;&lt;a href=&quot;http://www.planetjoel.com/flickr.class.tester.php&quot;&gt;Flickr-CAPTCHA online tester&lt;/a&gt;&lt;/p&gt;

Older Releases: &lt;a href=&quot;http://www.planetjoel.com/files/Flickr-CAPTCHA.0.1.tar.gz&quot;&gt;0.1&lt;/a&gt;.

        

        
        
        
        
        
        
        
            
        
	</description>
	<comments>http://www.planetjoel.com/viewarticle/630</comments>
</item><item>
	<guid isPermaLink="true">http://www.planetjoel.com/viewarticle/629</guid>
	<title>Python NSS netgroups interface</title>
	<author>Joel joelh-website@planetjoelDOTcom</author>
	<pubDate>Tue, 02 Dec 2008 21:16:09 +0000</pubDate>
	<link>http://www.planetjoel.com/viewarticle/629</link>
	<description>
	&lt;br /&gt; &lt;br /&gt;While working on my python test-sudoers script I realised I would need to query NSS netgroups. I went looking for a python module that would do that, and I found the &lt;a href=&quot;http://www.python.org/doc/2.5.2/lib/module-nis.html&quot;&gt;nis module&lt;/a&gt; but this wasn&#039;t really what I was after. The NIS module allows you to query NIS netgroups if you have a NIS domain set up - we have an LDAP server that serves out netgroups. This sounded like a good opportunity to attempt to write my first C python extension!&lt;/p&gt;

&lt;br /&gt; &lt;br /&gt;The python C extension framework is actually fantastically easy to use even for someone who is not a natural C programmer like myself. This gotcha&#039;s are around reference counters since you have to keep the garbage collector aware of what you are doing. But that is not too bad. What did throw me off was a simple valgrind run of a very simple test case produced 4KB&#039;s or so of memory leak. I spent a while trying to fiddle and fix the reference count stuff to see if I was doing something wrong and leaving something with two many references. By causing it to crash I was able to determine that yes I had the minimal number of reference counters so I had a different problem. I ran &quot;valgrind getent netgroup LinuxAdmins&quot; and there it was - the NSS libraries themselves were leaking memory. Interesting.&lt;/p&gt;

&lt;br /&gt; &lt;br /&gt;Here is my &lt;a href=&quot;http://www.planetjoel.com/files/python-netgroup.0.11.tar.gz&quot;&gt;python NSS netgroups&lt;/a&gt; module. To compile it download and run &quot;python setup.py build&quot; then &quot;python setup.py install&quot;. You should already have NSS setup to query netgroup information (&quot;getent netgroup somegroup&quot; should work). For further help simply run pythons help() routinue on the module. &lt;/p&gt;

&lt;br /&gt; &lt;br /&gt;&lt;a href=&quot;http://www.planetjoel.com/files/python-netgroup.0.11.tar.gz&quot;&gt;&lt;b&gt;Python NSS netgroups module v0.11&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;

&lt;br /&gt; &lt;br /&gt;UPDATE: Fixed some INCREF bugs thanks to bioinformed&lt;/a&gt;&lt;/p&gt;
    
            
        
        
	</description>
	<comments>http://www.planetjoel.com/viewarticle/629</comments>
</item><item>
	<guid isPermaLink="true">http://www.planetjoel.com/viewarticle/628</guid>
	<title>An open letter to Stephen Conroy regarding Net Filtering Proposal</title>
	<author>Joel joelh-website@planetjoelDOTcom</author>
	<pubDate>Tue, 11 Nov 2008 21:10:45 +0000</pubDate>
	<link>http://www.planetjoel.com/viewarticle/628</link>
	<description>
	&lt;br /&gt; &lt;br /&gt;Dear Stephen Conroy,&lt;/p&gt;

&lt;br /&gt; &lt;br /&gt;I work in the IT Industry in Sydney and so I have been closely
following the proposal to filter the internet at an ISP levels. I
won&#039;t re-iterate what I&#039;m sure other more experienced experts than
myself have already told you: that the plan is unworkable both from a
technical level and from a government level or that it is going to
cost millions of dollars and be unlikely to deliver any real outcomes.&lt;/p&gt;

&lt;br /&gt; &lt;br /&gt;I&#039;m writing to you about the international press about the plan which
is hampering Australia&#039;s ability to be taken seriously in the IT
space. Articles such as this one, which came out today, have long
lasting detrimental affect in terms of the reputation of Australia&#039;s
tech-saviness:&lt;/p&gt;

&lt;br /&gt; &lt;br /&gt;&lt;a href=&quot;http://arstechnica.com/news.ars/post/20081111-isps-talk-back-about-australias-non-optional-filtering-planaustralian-isps-pan-government-mandated-net-filtering-plan.html&quot;&gt;ars technica net filtering article&lt;/a&gt;&lt;/p&gt;

&lt;br /&gt; &lt;br /&gt;Americans and Europeans read articles like this and quite rightly
think Australians do not understand the internet at a government level
and are still trying to treat it like books, TV and Film. In a
globalized economy this ignorance damages our ability to be
participate in the tech economy. Listen to the ISPs, your technical
experts, consumers and voters and stop this plan which is designed
only to make those who do not understand it feel a sense of protection
that they do not have.&lt;/p&gt;

&lt;br /&gt; &lt;br /&gt;Thanks&lt;/p&gt;

Joel Heenan
    
	</description>
	<comments>http://www.planetjoel.com/viewarticle/628</comments>
</item><item>
	<guid isPermaLink="true">http://www.planetjoel.com/viewarticle/627</guid>
	<title>Stuff I have been doing - Oxley run</title>
	<author>Joel joelh-website@planetjoelDOTcom</author>
	<pubDate>Sun, 09 Nov 2008 15:37:11 +0000</pubDate>
	<link>http://www.planetjoel.com/viewarticle/627</link>
	<description>
	Here are some photos of a recent trip I went on up to Oxley:

&lt;a href=&quot;http://s162.photobucket.com/albums/t273/quinzx/oxley2610/&quot;&gt;Oxley run photos 26/10/2008&lt;/a&gt;. 
    
	</description>
	<comments>http://www.planetjoel.com/viewarticle/627</comments>
</item><item>
	<guid isPermaLink="true">http://www.planetjoel.com/viewarticle/626</guid>
	<title>test-sudoers.py - Test a sudoers file through python</title>
	<author>Joel joelh-website@planetjoelDOTcom</author>
	<pubDate>Wed, 05 Nov 2008 22:35:59 +0000</pubDate>
	<link>http://www.planetjoel.com/viewarticle/626</link>
	<description>
	&lt;br /&gt; &lt;br /&gt;I wrote a quick script called &lt;a href=&quot;http://www.planetjoel.com/files/test-sudoers.txt&quot;&gt;test-sudoers.py&lt;/a&gt; which reads a sudoers file and can answer questions like &quot;what commands can a particular user run on a particular host?&quot; and &quot;can a particular user run a command?&quot;. The latter is particularly useful because using return codes that can be scripted and allow certain actions based on whether they can run a specific command.&lt;/p&gt;

&lt;br /&gt; &lt;br /&gt;Its also very useful if you are writing a massive sudoers file (as I manage at my current job) and need tools to probe and prod it before rolling it out. &lt;/p&gt;

&lt;br /&gt; &lt;br /&gt;UPDATE 9/1/2009: v0.2 online which features support for netgroups. If you have installed my libnss netgroup bindings then you can perform netgroup based lookups using test-sudoers&lt;/p&gt;
        
        
	</description>
	<comments>http://www.planetjoel.com/viewarticle/626</comments>
</item><item>
	<guid isPermaLink="true">http://www.planetjoel.com/viewarticle/625</guid>
	<title>Senator On-Line</title>
	<author>Joel joelh-website@planetjoelDOTcom</author>
	<pubDate>Mon, 15 Oct 2007 18:37:05 +0000</pubDate>
	<link>http://www.planetjoel.com/viewarticle/625</link>
	<description>
	An Australian party running for the senate which allows you to &lt;a href=&quot;http://senatoronline.com.au/&quot;&gt;Vote Online on each issue they vote on&lt;/a&gt;. &lt;br /&gt; &lt;br /&gt;

I had a similar idea recently thinking about how referendums and so forth are only extreme because of the human cost of organising and counting them. With computers that cost can be very low.&lt;br /&gt; &lt;br /&gt;

Literally digg up this bill I love it.
	</description>
	<comments>http://www.planetjoel.com/viewarticle/625</comments>
</item><item>
	<guid isPermaLink="true">http://www.planetjoel.com/viewarticle/624</guid>
	<title>I got defrauded for $5</title>
	<author>Joel joelh-website@planetjoelDOTcom</author>
	<pubDate>Fri, 28 Sep 2007 02:04:19 +0000</pubDate>
	<link>http://www.planetjoel.com/viewarticle/624</link>
	<description>
	I went to the train station because I was running late and foolishly thought it might be slightly faster than walking (in my case its not I&#039;ve since found out). At the train station I saw I had two $10 notes and not wanting to get a fistful of change out of the machine headed over to one of the windows. I handed him the note and said where I was going, he took it and then gave me change for a $5. I told him I had given him a $10 and became slightly irate. He gave some bullshit story about how they always put the money on the side of the cash register, took a $5 note out and placed it on the side claiming it was mine.&lt;br /&gt; &lt;br /&gt;

I told the supervisor, he took down my details and gave me a call a few hours later. He informed me that they had balanced up the till and that it had balanced perfectly.&lt;br /&gt; &lt;br /&gt;

I&#039;m 100% certain that I gave a $10 note so I&#039;m left with this burning question as to why they would steal it. I can only think that with the prices of trains these days the average person would be unlikely to notice that they are short changed and they use this to supplement their wages. Is there supervisor in on this scam as well? How much would they skim in a typical day, $100 at most surely otherwise people would notice. Why not just give up the game when I caught him out? Maybe it really was a mistake and the guy got lucky and just overpaid someone else.
	</description>
	<comments>http://www.planetjoel.com/viewarticle/624</comments>
</item><item>
	<guid isPermaLink="true">http://www.planetjoel.com/viewarticle/623</guid>
	<title>Shoe tossing</title>
	<author>Joel joelh-website@planetjoelDOTcom</author>
	<pubDate>Fri, 28 Sep 2007 00:45:09 +0000</pubDate>
	<link>http://www.planetjoel.com/viewarticle/623</link>
	<description>
	Wikipedia mentions that &lt;A href=&quot;http://en.wikipedia.org/wiki/Shoe_tossing&quot;&gt;shoe tossing&lt;/a&gt; may indicate gang warfare, where to buy crack or heroin, or sites where people have been murdered.
	</description>
	<comments>http://www.planetjoel.com/viewarticle/623</comments>
</item></channel>
</rss>