<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Yabfog</title>
	<atom:link href="http://yabfog.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://yabfog.com/blog</link>
	<description>Yet another blog full of gas</description>
	<lastBuildDate>Fri, 13 Nov 2009 21:29:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='yabfog.com' port='80' path='/blog/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Delete Empty Folders</title>
		<link>http://yabfog.com/blog/2009/09/17/delete-empty-folders</link>
		<comments>http://yabfog.com/blog/2009/09/17/delete-empty-folders#comments</comments>
		<pubDate>Fri, 18 Sep 2009 03:03:49 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=240</guid>
		<description><![CDATA[I recently found that I had a lot of empty folders in my MP3 folder after a wayward ripping session. So I whipped up this quick DOS one-liner to remove all empty folders.
From a command prompt, just change to the folder containing all the empty folders and enter the following:
FOR /f  "tokens=*" %G IN [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found that I had a lot of empty folders in my MP3 folder after a wayward ripping session. So I whipped up this quick DOS one-liner to remove all empty folders.</p>
<p>From a command prompt, just change to the folder containing all the empty folders and enter the following:</p>
<p><code>FOR /f  "tokens=*" %G IN ('dir /ad /b /s') DO rd /q "%G"</code></p>
<p>The command "rd /q" will be executed on every folder, but "rd" only deletes empty folders -- "rd" does not delete non-empty folders.</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2009/09/17/delete-empty-folders/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>XMPP vCard Python Script</title>
		<link>http://yabfog.com/blog/2009/06/03/xmpp-vcard-python-script</link>
		<comments>http://yabfog.com/blog/2009/06/03/xmpp-vcard-python-script#comments</comments>
		<pubDate>Wed, 03 Jun 2009 16:39:31 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[gtalk]]></category>
		<category><![CDATA[jabber]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[vcard]]></category>
		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=231</guid>
		<description><![CDATA[Couldn't find a script to update my Jabber/XMPP vCard photo (a/k/a avatar), so I wrote one. It requires xmpppy (a/k/a python-xmpp). It should work with gTalk, but I have not tested it.
Credit to pastebin for some code snippets.
Hope this saves someone some time and effort.

#!/usr/bin/python
'''vcard.py - Update your XMPP vcard photo with the image you [...]]]></description>
			<content:encoded><![CDATA[<p>Couldn't find a script to update my Jabber/XMPP vCard photo (a/k/a avatar), so I wrote one. It requires xmpppy (a/k/a python-xmpp). It should work with gTalk, but I have not tested it.</p>
<p>Credit to <a href="http://en.pastebin.ca/1237241">pastebin</a> for some code snippets.</p>
<p>Hope this saves someone some time and effort.</p>
<pre>
#!/usr/bin/python
'''vcard.py - Update your XMPP vcard photo with the image you provide

Usage: vcard.py image_file jid password
'''

from xmpp import JID, Client, Iq, Presence, NS_VERSION, NS_VCARD
import sys
import os
import time
from base64 import encode, decode
from hashlib import sha1

try:
    file=os.path.expanduser(sys.argv[1])
    jid=sys.argv[2]
    password=sys.argv[3]
    resource='vcard'
except:
    print >>sys.stderr, __doc__
    sys.exit(2)

NS_VCARD_UPDATE = 'vcard-temp:x:update'
NS_NICK = 'http://jabber.org/protocol/nick'

def hash_img(img):
    return sha1(img).hexdigest()

def base64_img(img):
    return img.encode('base64')

def get_img(file):
    try:
        os.stat(file)[6]
        fh = open(file, 'rb')
        img = fh.read()
        return img
    except Exception, e:
        print >>sys.stderr, e
        sys.exit(2)

def get_mime_type(file):
    try:
        ext = file[-4:]
        if ext == '.png':
            mime_type = 'image/png'
        elif ext == '.gif':
            mime_type = 'image/gif'
        elif ext == '.jpg' or ext == '.jpeg':
            mime_type = 'image/jpeg'
        else:
            raise ValueError, "Wrong mime-type detected. Check file suffix."
    except ValueError, e:
        print >>sys.stderr, e
        sys.exit(2)
    return mime_type

def send_vcard(conn, base64_img, mime_type, nick):
    iq_vcard = Iq(typ='set')
    vcard = iq_vcard.addChild(name='vCard', namespace=NS_VCARD)
    vcard.addChild(name='NICKNAME', payload=[nick])
    photo = vcard.addChild(name='PHOTO')
    photo.setTagData(tag='TYPE', val=mime_type)
    photo.setTagData(tag='BINVAL', val=base64_img)
    conn.send(iq_vcard)

def send_presence(conn, status, hash1, nick):
    presence = Presence(status = status, show = 'xa', priority = '-1')
    presence.setTag(name='x',namespace=NS_VCARD_UPDATE).setTag(name='photo',namespace=NS_VCARD_UPDATE).setData(hash1)
    presence.setTag(name='nick',namespace=NS_NICK).setData(nick)
    conn.send(presence)

if __name__ == '__main__':
    img = get_img(file)
    j=JID(jid)
    cl=Client(j.getDomain(),debug=[])
    conn=cl.connect()
    if not conn:
        raise Exception, 'failed to start connection'
    auth=cl.auth(j.getNode(),password,resource,sasl=1)
    if not auth:
        raise Exception, 'could not authenticate'
    send_vcard(cl, base64_img(img), get_mime_type(file), j.getNode())
    send_presence(cl, 'Updated vCard Image', hash_img(img), j.getNode())
    time.sleep(1)
    cl.disconnect()
</pre>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2009/06/03/xmpp-vcard-python-script/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
	</item>
		<item>
		<title>On Bootstrapping</title>
		<link>http://yabfog.com/blog/2009/04/13/on-bootstrapping</link>
		<comments>http://yabfog.com/blog/2009/04/13/on-bootstrapping#comments</comments>
		<pubDate>Mon, 13 Apr 2009 16:12:02 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[bootstrap]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=225</guid>
		<description><![CDATA[On Friday, Dave Winer released a terrific thought-piece-of-a-podcast on how journalists need to learn about bootstraps. In his most recent podcast with NYU's Jay Rosen, he and Jay discussed the topic, as well, but I want to focus on bootstrapping, the metaphor.
Dave offered the well-worn phrase "haul yourself up by your bootstraps" as the mental [...]]]></description>
			<content:encoded><![CDATA[<p>On Friday, Dave Winer released a terrific <a href="http://www.scripting.com/stories/2009/04/10/journalistsNeedToLearnAbou.html">thought-piece-of-a-podcast</a> on how journalists need to learn about bootstraps. In his <a href="http://www.scripting.com/stories/2009/04/12/thisWeeksPodcastWithJayRos.html">most recent podcast with NYU's Jay Rosen</a>, he and Jay discussed the topic, as well, but I want to focus on bootstrapping, the metaphor.</p>
<p><img src="http://yabfog.com/blog/wp-content/uploads/2009/04/bootstrap.jpg" alt="bootstrap" title="bootstrap" width="115" height="130" class="alignleft size-full wp-image-226" />Dave offered the well-worn phrase "haul yourself up by your bootstraps" as the mental image we should have when we use the bootstrapping metaphor. Imagine that you're wearing your boots, you grab your bootstraps and pull on them. Well, the best outcome I can imagine is that you'd fail to accomplish anything. If you could accomplish anything, I think all you'd do is pull your feet out from under yourself. But the phrase is supposed to connote (I think) strength by self-determination and self-motivation. That's why MBA-types say they're going to "bootstrap" their start-ups when what they really mean is that their start-ups will be self-funded at the outset.</p>
<p>But I recall learning that before bootstraps became merely decorative, they actually served a useful purpose: namely, to strap your boots to the top of heavy items so you could carry them. Maybe it's apocryphal, but here's MY mental image of bootstrapping: a person on a horse, laden with a pack on its rump, and a heavy wooden storage box strapped to each of the rider's boots.</p>
<p>And that more closely matches what bootstrapping means to me: taking advantage of what's already up-and-running and using that existing momentum to get something else moving.</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2009/04/13/on-bootstrapping/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://yabfog.com/blog/wp-content/uploads/2009/04/bootstrap.jpg" />
		<media:content url="http://yabfog.com/blog/wp-content/uploads/2009/04/bootstrap.jpg" medium="image">
			<media:title type="html">bootstrap</media:title>
		</media:content>
	</item>
		<item>
		<title>BlackBerry Browser Bug with Mailto: Links</title>
		<link>http://yabfog.com/blog/2009/04/05/blackberry-browser-bug-with-mailto-links</link>
		<comments>http://yabfog.com/blog/2009/04/05/blackberry-browser-bug-with-mailto-links#comments</comments>
		<pubDate>Sun, 05 Apr 2009 18:47:58 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[fixes]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=222</guid>
		<description><![CDATA[Mailto links give error dialog in browser when email address is missing .
]]></description>
			<content:encoded><![CDATA[<p><a href="http://supportforums.blackberry.com/rim/board/message?board.id=browser_dev&#038;message.id=922">Mailto links give error dialog in browser when email address is missing </a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2009/04/05/blackberry-browser-bug-with-mailto-links/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Happy Birthday! Go to Hell! Many Thanks!</title>
		<link>http://yabfog.com/blog/2009/03/31/happy-birthday-go-to-hell-many-thanks</link>
		<comments>http://yabfog.com/blog/2009/03/31/happy-birthday-go-to-hell-many-thanks#comments</comments>
		<pubDate>Wed, 01 Apr 2009 03:20:05 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[photo]]></category>
		<category><![CDATA[humor]]></category>

		<guid isPermaLink="false">http://tumblr.yabfog.com/post/91778512</guid>
		<description><![CDATA[
Happy Birthday! &#8230; Go to Hell! Many Thanks!
]]></description>
			<content:encoded><![CDATA[<p><img src="http://14.media.tumblr.com/4axCeftvZlqzvi04vqwH8xtao1_500.jpg" alt=""/></p>
<p>Happy Birthday! &#8230; Go to Hell! Many Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2009/03/31/happy-birthday-go-to-hell-many-thanks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://14.media.tumblr.com/4axCeftvZlqzvi04vqwH8xtao1_500.jpg" />
		<media:content url="http://14.media.tumblr.com/4axCeftvZlqzvi04vqwH8xtao1_500.jpg" medium="image" />
	</item>
		<item>
		<title></title>
		<link>http://yabfog.com/blog/2009/03/12/85844818</link>
		<comments>http://yabfog.com/blog/2009/03/12/85844818#comments</comments>
		<pubDate>Thu, 12 Mar 2009 15:45:48 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[photo]]></category>
		<category><![CDATA[jail]]></category>
		<category><![CDATA[monopoly]]></category>

		<guid isPermaLink="false">http://tumblr.yabfog.com/post/85844818</guid>
		<description><![CDATA[

]]></description>
			<content:encoded><![CDATA[<p><img src="http://18.media.tumblr.com/4axCeftvZkz5poy5xtnRc9IBo1_250.jpg" alt=""/></p>
<p><a href="http://abovethelaw.com/monopoly-go-to-jail-card.jpg"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2009/03/12/85844818/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://18.media.tumblr.com/4axCeftvZkz5poy5xtnRc9IBo1_250.jpg" />
		<media:content url="http://18.media.tumblr.com/4axCeftvZkz5poy5xtnRc9IBo1_250.jpg" medium="image" />
	</item>
		<item>
		<title>Earth 2?</title>
		<link>http://yabfog.com/blog/2009/03/07/earth-2</link>
		<comments>http://yabfog.com/blog/2009/03/07/earth-2#comments</comments>
		<pubDate>Sun, 08 Mar 2009 01:17:16 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[photo]]></category>
		<category><![CDATA[earth2]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[old times]]></category>

		<guid isPermaLink="false">http://tumblr.yabfog.com/post/84478604</guid>
		<description><![CDATA[
Earth 2?
]]></description>
			<content:encoded><![CDATA[<p><img src="http://7.media.tumblr.com/4axCeftvZkskx3wzDI6OPrpgo1_500.jpg" alt=""/></p>
<p>Earth 2?</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2009/03/07/earth-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://7.media.tumblr.com/4axCeftvZkskx3wzDI6OPrpgo1_500.jpg" />
		<media:content url="http://7.media.tumblr.com/4axCeftvZkskx3wzDI6OPrpgo1_500.jpg" medium="image" />
	</item>
		<item>
		<title></title>
		<link>http://yabfog.com/blog/2009/03/03/its-still-whittling</link>
		<comments>http://yabfog.com/blog/2009/03/03/its-still-whittling#comments</comments>
		<pubDate>Tue, 03 Mar 2009 21:42:12 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[link]]></category>
		<category><![CDATA[quote]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[whittling]]></category>

		<guid isPermaLink="false">http://tumblr.yabfog.com/post/83252390</guid>
		<description><![CDATA[Sure, there are probably whittlers who could take a log, go after it with a knife for a couple of days and come back with a fair representation of a bobcat or Jefferson Davis. And yet, it's still whittling.Music: What Happened? By Michael J. Nelson
]]></description>
			<content:encoded><![CDATA[<p>Sure, there are probably whittlers who could take a log, go after it with a knife for a couple of days and come back with a fair representation of a bobcat or Jefferson Davis. And yet, it's still whittling.<br /><a title="Wayback Machine Link" href="http://web.archive.org/web/20010210005657/www.timmybighands.com/essays/music_what_hap.asp">Music: What Happened?</a> By Michael J. Nelson</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2009/03/03/its-still-whittling/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Fantastic!</title>
		<link>http://yabfog.com/blog/2009/02/05/fantastic</link>
		<comments>http://yabfog.com/blog/2009/02/05/fantastic#comments</comments>
		<pubDate>Thu, 05 Feb 2009 17:52:27 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[photo]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[tetris]]></category>

		<guid isPermaLink="false">http://tumblr.yabfog.com/post/75918230</guid>
		<description><![CDATA[
Fantastic!
]]></description>
			<content:encoded><![CDATA[<p><img src="http://2.media.tumblr.com/4axCeftvZjl9tifdwMBucrSro1_400.jpg" alt=""/></p>
<p>Fantastic!</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2009/02/05/fantastic/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://2.media.tumblr.com/4axCeftvZjl9tifdwMBucrSro1_400.jpg" />
		<media:content url="http://2.media.tumblr.com/4axCeftvZjl9tifdwMBucrSro1_400.jpg" medium="image" />
	</item>
		<item>
		<title>Good Bank, Bad Bank; Good Plan, Better Plan</title>
		<link>http://yabfog.com/blog/2009/02/01/good-bank-bad-bank-good-plan-better-plan</link>
		<comments>http://yabfog.com/blog/2009/02/01/good-bank-bad-bank-good-plan-better-plan#comments</comments>
		<pubDate>Sun, 01 Feb 2009 15:35:00 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[link]]></category>
		<category><![CDATA[economics]]></category>
		<category><![CDATA[opinion]]></category>

		<guid isPermaLink="false">http://tumblr.yabfog.com/post/74788578</guid>
		<description><![CDATA[Good Bank, Bad Bank; Good Plan, Better Plan
This is a good spin on the "bad bank" idea. But what I don't understand is why we need a bad bank at all. I thought the whole point of a bad bank would be to enable new capital investment in banks by clearing out their balance sheets. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nytimes.com/2009/02/01/opinion/01holmes.html">Good Bank, Bad Bank; Good Plan, Better Plan</a>
<p>This is a good spin on the "bad bank" idea. But what I don't understand is why we need a bad bank at all. I thought the whole point of a bad bank would be to enable new capital investment in banks by clearing out their balance sheets. Well, the banks already received the new capital investment -- TARP funds. Why do they need to get the bad assets off of their balance sheets? They've got their new capital. Now, just hang on to the bad assets and liquidate them over the next several years, possibly at a profit -- just like the bad bank would do! What am I missing?</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2009/02/01/good-bank-bad-bank-good-plan-better-plan/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
	</channel>
</rss>
