<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2" -->
<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/"
	>

<channel>
	<title>Voder-Vocoder</title>
	<link>http://halcanary.org/vv</link>
	<description>The Log of Hal Canary</description>
	<pubDate>Sun, 10 Aug 2008 13:34:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>
	<language>en</language>
			<item>
		<title>nocomments</title>
		<link>http://halcanary.org/vv/2008/08/10/729/</link>
		<comments>http://halcanary.org/vv/2008/08/10/729/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 13:31:10 +0000</pubDate>
		<dc:creator>Hal Canary</dc:creator>
		
		<category><![CDATA[Computers &amp; Code]]></category>

		<guid isPermaLink="false">http://halcanary.org/vv/2008/08/10/729/</guid>
		<description><![CDATA[#!/bin/sh
# ~/bin/nocomments
# Remove all '#' commented lines and
# empty lines.  Use stdin and stdout.
# Written 2007 Hal Canary.
# Dedicated to the Public Domain.
grep -v '^&#0092;#&#0092;&#124;^$' &#34;$@&#34;
]]></description>
			<content:encoded><![CDATA[<pre>#!/bin/sh
# ~/bin/nocomments
# Remove all '#' commented lines and
# empty lines.  Use stdin and stdout.
# Written 2007 Hal Canary.
# Dedicated to the Public Domain.
grep -v '^&#0092;#&#0092;|^$' &quot;$@&quot;</pre>
]]></content:encoded>
			<wfw:commentRss>http://halcanary.org/vv/2008/08/10/729/feed/</wfw:commentRss>
		</item>
		<item>
		<title>the diet</title>
		<link>http://halcanary.org/vv/2008/08/10/728/</link>
		<comments>http://halcanary.org/vv/2008/08/10/728/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 12:06:34 +0000</pubDate>
		<dc:creator>Hal Canary</dc:creator>
		
		<category><![CDATA[Food]]></category>

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

		<guid isPermaLink="false">http://halcanary.org/vv/2008/08/10/728/</guid>
		<description><![CDATA[People ask what I eat.  Here it is:
The Diet:
Breakfast
	&#x2022; 1 quart of iced tea, prepared the night before and allowed to cool to room temperature before adding ice. (I like to start the day hydrated.)
	&#x2022; 1 cup Uncle Sam Cereal, served with non-fat milk, berries (straw-, black-, rasp-, or blue-), and 1 packet of [...]]]></description>
			<content:encoded><![CDATA[<p>People ask what I eat.  Here it is:</p>
<p><strong>The Diet:</strong></p>
<p><em>Breakfast</em><br />
	&#x2022; 1 quart of iced tea, prepared the night before and allowed to cool to room temperature before adding ice. (I like to start the day hydrated.)<br />
	&#x2022; 1 cup Uncle Sam Cereal, served with non-fat milk, berries (straw-, black-, rasp-, or blue-), and 1 packet of sucralose.</p>
<p><em>Lunch</em><br />
	&#x2022; Salad, prepared before work:  Spinach or lettuce, cubed smoked turkey lunch-meat, cheese (reduced-fat feta, cheddar, or blue), nuts (pecans, almond slices, sunflower kernels, or peanuts), sometimes berries, and home-made vinaigrette.<br />
	&#x2022; 1/2 cup unsalted peanuts, mixed with half a box of raisins.  (I sometimes make this my mid-morning snack, if I have an opportunity.)<br />
	&#x2022; Two reduced-fat low-moisture Mozzarella string cheese sticks.<br />
	&#x2022; 1 quart of iced tea, left over from breakfast.</p>
<p><em>Mid-afternoon Snack</em><br />
	&#x2022; 1/2 cup unsalted peanuts, mixed with the other half of the box of raisins.<br />
	&#x2022; Water.</p>
<p><em>Dinner</em><br />
	&#x2022; An identical salad, prepared  with lunch that morning.<br />
	&#x2022; Water<br />
	&#x2022; 2 cups of low-cal yogurt (if I&#8217;m still hungry).</p>
]]></content:encoded>
			<wfw:commentRss>http://halcanary.org/vv/2008/08/10/728/feed/</wfw:commentRss>
		</item>
		<item>
		<title>/etc/sudoers</title>
		<link>http://halcanary.org/vv/2008/08/08/727/</link>
		<comments>http://halcanary.org/vv/2008/08/08/727/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 11:46:24 +0000</pubDate>
		<dc:creator>Hal Canary</dc:creator>
		
		<category><![CDATA[Computers &amp; Code]]></category>

		<guid isPermaLink="false">http://halcanary.org/vv/2008/08/08/727/</guid>
		<description><![CDATA[Because the syntax of the /etc/sudoers file is obscure, I&#8217;m noting down here exactly what I&#8217;ve done to mine:

root	ALL=(ALL) ALL
%admin ALL=(ALL) ALL
%admin ALL=NOPASSWD: /usr/bin/wodim
%admin ALL=NOPASSWD: /usr/bin/apt-get
%admin ALL=NOPASSWD: /sbin/reboot
%admin ALL=NOPASSWD: /sbin/poweroff
This allows a few commonly used commands to be executed without a password.
]]></description>
			<content:encoded><![CDATA[<p>Because the syntax of the <em>/etc/sudoers</em> file is obscure, I&#8217;m noting down here exactly what I&#8217;ve done to mine:</p>
<pre>
root	ALL=(ALL) ALL
%admin ALL=(ALL) ALL
%admin ALL=NOPASSWD: /usr/bin/wodim
%admin ALL=NOPASSWD: /usr/bin/apt-get
%admin ALL=NOPASSWD: /sbin/reboot
%admin ALL=NOPASSWD: /sbin/poweroff</pre>
<p>This allows a few commonly used commands to be executed without a password.</p>
]]></content:encoded>
			<wfw:commentRss>http://halcanary.org/vv/2008/08/08/727/feed/</wfw:commentRss>
		</item>
		<item>
		<title>9 pounds of bacon</title>
		<link>http://halcanary.org/vv/2008/06/15/725/</link>
		<comments>http://halcanary.org/vv/2008/06/15/725/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 23:55:07 +0000</pubDate>
		<dc:creator>Hal Canary</dc:creator>
		
		<category><![CDATA[Physics]]></category>

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

		<guid isPermaLink="false">http://halcanary.org/vv/2008/06/15/725/</guid>
		<description><![CDATA[&#8220;The Deliverator&#8217;s car has enough potential energy packed into its batteries to fire a pound of bacon into the Asteroid Belt.&#8221;
I did the calculation just now.  My 20 gallon gas tank has enough potential energy to put 9 pounds of bacon into the Asteroid Belt.
131 megajoules * 20 / G / ( (mass of [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;The Deliverator&#8217;s car has enough potential energy packed into its batteries to fire a pound of bacon into the Asteroid Belt.&#8221;</p>
<p>I did the calculation just now.  My 20 gallon gas tank has enough potential energy to put 9 pounds of bacon into the Asteroid Belt.</p>
<p><a href="http://www.google.com/search?q=131+megajoules+*+20+%2F+G+%2F+(+(mass+of+sun+%2F+414%2C703%2C838+km)+-+(mass+of+sun%2F+149%2C597%2C887.5+km)+-+(mass+of+earth+%2F+radius+of+earth))+in+pounds">131 megajoules * 20 / G / ( (mass of sun / 414,703,838 km) - (mass of sun/ 149,597,887.5 km) - (mass of earth / radius of earth)) in pounds</a></p>
]]></content:encoded>
			<wfw:commentRss>http://halcanary.org/vv/2008/06/15/725/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jolietify</title>
		<link>http://halcanary.org/vv/2008/06/07/723/</link>
		<comments>http://halcanary.org/vv/2008/06/07/723/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 22:11:49 +0000</pubDate>
		<dc:creator>Hal Canary</dc:creator>
		
		<category><![CDATA[Computers &amp; Code]]></category>

		<guid isPermaLink="false">http://halcanary.org/vv/2008/06/07/723/</guid>
		<description><![CDATA[#!/usr/bin/env python

# jolietify - reduce a filename to 64 chars, preserving
# the suffix.
#
# See http://en.wikipedia.org/wiki/Joliet_(file_system)
# for a justification.  It is recomended that filenames
# be reduced to 64 chars before putting on a CD-ROM.
#
# Copyright 2008 Hal Canary
#
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and
# [...]]]></description>
			<content:encoded><![CDATA[<pre>#!/usr/bin/env python

# jolietify - reduce a filename to 64 chars, preserving
# the suffix.
#
# See http://en.wikipedia.org/wiki/Joliet_(file_system)
# for a justification.  It is recomended that filenames
# be reduced to 64 chars before putting on a CD-ROM.
#
# Copyright 2008 Hal Canary
#
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and
# associated documentation files (the &#0039;Software&#0039;), to
# deal in the Software without restriction, including
# without limitation the rights to use, copy, modify,
# merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom
# the Software is furnished to do so, subject to the
# following conditions:
#
# The above copyright notice and this permission notice
# shall be included in all copies or substantial
# portions of the Software.
#
# THE SOFTWARE IS PROVIDED &#0039;AS IS&#0039;, WITHOUT WARRANTY OF
# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
# LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
# EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import sys
import glob
import os
import os.path

def jolietify(dirfilename):
    (head,fname) = os.path.split(dirfilename)
    if (len(fname) &lt;= 64):
        print &quot;Is good:&quot;, dirfilename
        return 1
    splitname=fname.rsplit(&#0039;.&#0039;,1)
    if (len(splitname) == 1):
	new=os.path.join(head,splitname[0][0:64])
        print &#0039;rename&#0039;, dirfilename, new
        os.rename(dirfilename, new)
        return 0
    else:
	new=os.path.join(head,
            splitname[0][0:63-len(splitname[1])]+&#0039;.&#0039;+splitname[1])
	print &#0039;rename&#0039;, dirfilename, new
        os.rename(dirfilename, new)
        return 0

if __name__ == &quot;__main__&quot;:
    for x in sys.argv[1:]:
       for y in glob.glob(x):
            jolietify(y)</pre>
]]></content:encoded>
			<wfw:commentRss>http://halcanary.org/vv/2008/06/07/723/feed/</wfw:commentRss>
		</item>
		<item>
		<title>~/bin/longest-filename</title>
		<link>http://halcanary.org/vv/2008/06/07/722/</link>
		<comments>http://halcanary.org/vv/2008/06/07/722/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 22:10:57 +0000</pubDate>
		<dc:creator>Hal Canary</dc:creator>
		
		<category><![CDATA[Computers &amp; Code]]></category>

		<guid isPermaLink="false">http://halcanary.org/vv/2008/06/07/722/</guid>
		<description><![CDATA[#!/bin/sh
#DTPD#
# ~/bin/longest-filename
# How long is the longest filename
# in these directories?
{ for x in &#34;$@&#34; ; do
find &#34;$x&#34; -exec basename {} &#0092;;
done } &#124; wc -L
]]></description>
			<content:encoded><![CDATA[<pre>#!/bin/sh
#DTPD#
# ~/bin/longest-filename
# How long is the longest filename
# in these directories?
{ for x in &quot;$@&quot; ; do
find &quot;$x&quot; -exec basename {} &#0092;;
done } | wc -L</pre>
]]></content:encoded>
			<wfw:commentRss>http://halcanary.org/vv/2008/06/07/722/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rewrite the tax code!</title>
		<link>http://halcanary.org/vv/2008/05/30/721/</link>
		<comments>http://halcanary.org/vv/2008/05/30/721/#comments</comments>
		<pubDate>Fri, 30 May 2008 11:18:21 +0000</pubDate>
		<dc:creator>Hal Canary</dc:creator>
		
		<category><![CDATA[Energy Policy]]></category>

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

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

		<guid isPermaLink="false">http://halcanary.org/vv/2008/05/30/721/</guid>
		<description><![CDATA[Rules of the game:
You can change anything you want about the federal tax code, but your changes must be revenue-neutral. No starve-the-beast proposals.
* * *
My suggestion.
&#8211;> Let A be the annual income a full-time (40-hour/week) minimum-wage worker would make.
&#8211;> Let B be the annual income of the median worker. (50% of Americans make less than [...]]]></description>
			<content:encoded><![CDATA[<p>Rules of the game:</p>
<p>You can change anything you want about the federal tax code, but your changes must be revenue-neutral. No starve-the-beast proposals.</p>
<p>* * *</p>
<p>My suggestion.</p>
<p>&#8211;> Let A be the annual income a full-time (40-hour/week) minimum-wage worker would make.</p>
<p>&#8211;> Let B be the annual income of the median worker. (50% of Americans make less than him, 50% more.)</p>
<p>&#8211;> Let C be the income of the 67-percentile worker. (66.7% of Americans make less than him, 33.3% more.)</p>
<p>Replace current federal taxes with the following:</p>
<p>1) Increase the EITC (earned income tax credit) to a very large level. Make it 0 at zero income, maximum at A, and get down to 0 again at B.</p>
<p>2) Income tax of 50% on all income greater than C, minus philanthropic donations.</p>
<p>3) A huge tax on carbon emissions. On the order of $10 per gallon of gasoline, with an carbon-equivalent tax on coal, diesel, natural gas, etc.</p>
<p>4) A general policy that <a href="http://en.wikipedia.org/wiki/Pigovian_tax">negative externalities are taxed equal to the indirect cost</a> to society. Carbon emissions are the biggest part of this at the moment, but I like the idea of pollution taxes greater than the cost of totally cleaning up the pollution. And a big tax on non-reusable goods.</p>
<p>* * *</p>
<p>UPDATE: Hey, there&#8217;s a website for <a href="http://www.carbontax.org/">revenue-neutral carbon taxes</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://halcanary.org/vv/2008/05/30/721/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Razor</title>
		<link>http://halcanary.org/vv/2008/03/24/720/</link>
		<comments>http://halcanary.org/vv/2008/03/24/720/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 01:48:02 +0000</pubDate>
		<dc:creator>Hal Canary</dc:creator>
		
		<category><![CDATA[TV]]></category>

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

		<guid isPermaLink="false">http://halcanary.org/vv/2008/03/24/720/</guid>
		<description><![CDATA[Saw today that Battlestar Galactica “Razor” was nominated for the 2008 Hugo for Best Dramatic Presentation, Short Form.  I wouldn&#8217;t call a 104 minute film &#8220;short,&#8221; even if the abridged version premired on TV before it was released on DVD.  I also noticed that I still hadn&#8217;t watched it, even though the Netflix [...]]]></description>
			<content:encoded><![CDATA[<p>Saw today that <em>Battlestar Galactica</em> “Razor” was nominated for the 2008 Hugo for Best Dramatic Presentation, Short Form.  I wouldn&#8217;t call a 104 minute film &#8220;short,&#8221; even if the abridged version premired on TV before it was released on DVD.  I also noticed that I still hadn&#8217;t watched it, even though the Netflix DVD was sitting on my desk.</p>
<p>So I watched it.  Four nested flashbacks.  Yeah, I&#8217;d vote for it, were I a voter.  Although I did like &#8220;Blink.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://halcanary.org/vv/2008/03/24/720/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ibii+</title>
		<link>http://halcanary.org/vv/2008/02/13/719/</link>
		<comments>http://halcanary.org/vv/2008/02/13/719/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 15:47:41 +0000</pubDate>
		<dc:creator>Hal Canary</dc:creator>
		
		<category><![CDATA[Photos]]></category>

		<guid isPermaLink="false">http://halcanary.org/vv/2008/02/13/719/</guid>
		<description><![CDATA[ Ibises
 Black-crowned Night Heron






]]></description>
			<content:encoded><![CDATA[<p><a href="/photos/2008-02-10_165800_dsc_0159.jpg"><img src="/photos/thumb/2008-02-10_165800_dsc_0159.jpg"  alt="[Thumb]" /></a> Ibises</p>
<p><a href="/photos/2008-02-10_164202_dscn0178_b.jpg"><img src="/photos/thumb/2008-02-10_164202_dscn0178_b.jpg"  alt="[Thumb]" width="120" height="120" /></a> Black-crowned Night Heron</p>
<p><a href="/photos/2008-02-10_165548_dsc_0153_b.jpg"><img src="/photos/thumb/2008-02-10_165548_dsc_0153_b.jpg"  alt="[Thumb]" width="120" height="96" /></a></p>
<p><a href="/photos/2008-02-10_170944_dsc_0162_b.jpg"><img src="/photos/thumb/2008-02-10_170944_dsc_0162_b.jpg"  alt="[Thumb]" width="120" height="80" /></a></p>
<p><a href="/photos/2008-02-10_171030_dsc_0166_b.jpg"><img src="/photos/thumb/2008-02-10_171030_dsc_0166_b.jpg"  alt="[Thumb]" width="120" height="80" /></a></p>
<p><a href="/photos/2008-02-10_171206_dscn0190_b.jpg"><img src="/photos/thumb/2008-02-10_171206_dscn0190_b.jpg"  alt="[Thumb]" width="90" height="120" /></a></p>
<p><a href="/photos/2008-02-10_171210_dscn0191_b.jpg"><img src="/photos/thumb/2008-02-10_171210_dscn0191_b.jpg"  alt="[Thumb]" width="120" height="90" /></a></p>
<p><a href="/photos/2008-02-10_172230_dsc_0171_b.jpg"><img src="/photos/thumb/2008-02-10_172230_dsc_0171_b.jpg"  alt="[Thumb]" width="120" height="90" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://halcanary.org/vv/2008/02/13/719/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Random password generator</title>
		<link>http://halcanary.org/vv/2008/02/03/718/</link>
		<comments>http://halcanary.org/vv/2008/02/03/718/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 03:56:27 +0000</pubDate>
		<dc:creator>Hal Canary</dc:creator>
		
		<category><![CDATA[Computers &amp; Code]]></category>

		<guid isPermaLink="false">http://halcanary.org/vv/2008/02/03/718/</guid>
		<description><![CDATA[
#!/usr/bin/env python

# Randoms - Copyright 2008 Hal Canary
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the 'Software'), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://halcanary.org/images/randomness-app.png" alt="" /></p>
<pre>#!/usr/bin/env python

# Randoms - Copyright 2008 Hal Canary
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the 'Software'), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import Tkinter
import os
import base64

def genrandint():
    'Generates a random integer between 0 and (2^32)-1'
    x = 0
    for i in range(4):
        x = (x &lt;&lt; 8)+ord(os.urandom(1))
    return x

def randstring():
    'generate a 142-bit password consisting of A-Za-z0-9'
    return base64.b64encode(os.urandom(18),'Zz')

def genrand128int():
    'Generates a random integer between 0 and (2^128)-1'
    x = 0
    for i in range(16):
        x = (x &lt;&lt; 8)+ord(os.urandom(1))
    return x

def generaterandletts():
    'generate a 131-bit password consisting of a-z'
    s = ''
    for i in range(28):
        x = ''
        while x == '' :
            y = ord(os.urandom(1)) # 0-255
            if y &lt; (256//26*26):
                x = chr((y % 26) + 97)
        s = s + x
        if i%4 == 3:
            s = s + ' '
    return s

class Application(Tkinter.Frame):
    'a window that displays text'
    def __init__(self, master=None):
        Tkinter.Frame.__init__(self, master)
        self.grid()
        self.createWidgets()
        self.winfo_toplevel().resizable(width=False, height=False)

    def createWidgets(self):
        self.textBox = Tkinter.Text(self,height=4,padx=5, pady=5)
        self.textBox.grid()
        self.textBox.configure(state='disabled')
        self.quitButton = Tkinter.Button(self, text="Quit", command=self.quit)
        self.quitButton.grid()        

    def addText(self, pos, string):
        self.textBox.configure(state='normal')
        self.textBox.insert (pos, string)
        self.textBox.configure(state='disabled')        

app = Application()
app.master.title('Randomness')
app.addText('1.0', 'Integer: %d&#92;n' % genrandint())
app.addText('2.0', 'Integer: %d&#92;n' % genrand128int())
app.addText('3.0', 'String: %s&#92;n' % randstring())
app.addText('4.0', 'String: %s' % generaterandletts())
app.mainloop()</pre>
<p><a href="http://halcanary.org/pub/Randoms.zip">Compiled version for windows</a></p>
]]></content:encoded>
			<wfw:commentRss>http://halcanary.org/vv/2008/02/03/718/feed/</wfw:commentRss>
		</item>
		<item>
		<title>zipme.py</title>
		<link>http://halcanary.org/vv/2008/01/28/717/</link>
		<comments>http://halcanary.org/vv/2008/01/28/717/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 01:49:48 +0000</pubDate>
		<dc:creator>Hal Canary</dc:creator>
		
		<category><![CDATA[Computers &amp; Code]]></category>

		<guid isPermaLink="false">http://halcanary.org/vv/2008/01/28/717/</guid>
		<description><![CDATA[
#!/usr/bin/env python

# zipme.py - Copyright 2008 Hal Canary
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the &#34;Software&#34;), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the [...]]]></description>
			<content:encoded><![CDATA[<pre>
#!/usr/bin/env python

# zipme.py - Copyright 2008 Hal Canary
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the &quot;Software&quot;), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

# To use me:
#   >>> from zipme import zipme
#   >>> zipme('directoryname')

import zipfile
import os
import os.path
def zipdir(z,x):
    if os.path.isfile(x):
        z.write(x)
        print 'wrote %s' % x
    elif os.path.isdir(x):
        for y in os.listdir(x):
            zipdir(z,x + os.sep + y)
    else:
        print 'ERROR: %s' % x

def zipme(d):
    z = zipfile.ZipFile(d+'.zip','w',zipfile.ZIP_DEFLATED)
    zipdir(z,d)
    z.close()

if __name__ == &quot;__main__&quot;:
    zipme('Randoms')</pre>
]]></content:encoded>
			<wfw:commentRss>http://halcanary.org/vv/2008/01/28/717/feed/</wfw:commentRss>
		</item>
		<item>
		<title>genpasswd.py</title>
		<link>http://halcanary.org/vv/2008/01/27/716/</link>
		<comments>http://halcanary.org/vv/2008/01/27/716/#comments</comments>
		<pubDate>Sun, 27 Jan 2008 19:54:05 +0000</pubDate>
		<dc:creator>Hal Canary</dc:creator>
		
		<category><![CDATA[Computers &amp; Code]]></category>

		<guid isPermaLink="false">http://halcanary.org/vv/2008/01/27/716/</guid>
		<description><![CDATA[
#!/usr/bin/env python
# ~/bin/genpasswd.py
#   Generate a random password with about
#   142 bits of randomness, making use of
#   /dev/urandom.
# Note:
#   Most online services have somewhat
#   arbitrary rules about what characters
#   can be included in a password. So we
#   limit ourselves to A-Za-z0-9.
# Copyright [...]]]></description>
			<content:encoded><![CDATA[<pre>
#!/usr/bin/env python
# ~/bin/genpasswd.py
#   Generate a random password with about
#   142 bits of randomness, making use of
#   /dev/urandom.
# Note:
#   Most online services have somewhat
#   arbitrary rules about what characters
#   can be included in a password. So we
#   limit ourselves to A-Za-z0-9.
# Copyright 2007-2008 Hal Canary
# Dedicated to the Public Domain.
import os, base64
print base64.b64encode(os.urandom(18),'Zz')</pre>
]]></content:encoded>
			<wfw:commentRss>http://halcanary.org/vv/2008/01/27/716/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
