<?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>Pixelated Words</title>
	<atom:link href="http://chiarg.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://chiarg.com</link>
	<description></description>
	<lastBuildDate>Thu, 13 May 2010 19:32:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>OpenSocial Templates + YQL</title>
		<link>http://chiarg.com/?p=335</link>
		<comments>http://chiarg.com/?p=335#comments</comments>
		<pubDate>Thu, 13 May 2010 19:32:00 +0000</pubDate>
		<dc:creator>Chirag</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://chiarg.com/?p=335</guid>
		<description><![CDATA[Here&#8217;s a simple example showing how you can use OpenSocial Templates to easily make YQL queries:]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple example showing how you can use OpenSocial Templates to easily make YQL queries:</p>
<p><script src="http://gist.github.com/399355.js?file=OpenSocial+Templates+%2B+YQL"></script></p>]]></content:encoded>
			<wfw:commentRss>http://chiarg.com/?feed=rss2&amp;p=335</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2009 Favorites</title>
		<link>http://chiarg.com/?p=324</link>
		<comments>http://chiarg.com/?p=324#comments</comments>
		<pubDate>Mon, 04 Jan 2010 22:56:22 +0000</pubDate>
		<dc:creator>Chirag</dc:creator>
				<category><![CDATA[2009]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Favorites]]></category>

		<guid isPermaLink="false">http://chiarg.com/?p=324</guid>
		<description><![CDATA[Some books I liked this year: Even Faster Web Sites by Steve Souders Code Complete by Steve McConnell Coders at Work by Peter Seibel Autobiography of a Yogi by  Paramahansa Yogananda Music Is This It by The Strokes Geogaddi by Boards of Canada Tum Mile by Javed Ali, K. K., Neeraj Shridhar, and Shafqat Amanat Ali]]></description>
			<content:encoded><![CDATA[<p>Some books I liked this year:</p>
<ul>
<li><a href="http://www.amazon.com/s/?url=search-alias%3Daps&#038;field-keywords=Even+Faster+Web+Sites&#038;tag=chiarg-20">Even Faster Web Sites</a> by Steve Souders</li>
<li><a href="http://www.amazon.com/s/?url=search-alias%3Daps&#038;field-keywords=Code+Complete&#038;tag=chiarg-20">Code Complete</a> by Steve McConnell</li>
<li><a href="http://www.amazon.com/s/?url=search-alias%3Daps&#038;field-keywords=Coders+at+Work&#038;tag=chiarg-20">Coders at Work</a> by Peter Seibel</li>
<li><a href="http://www.amazon.com/s/?url=search-alias%3Daps&#038;field-keywords=Autobiography+of+a+Yogi&#038;tag=chiarg-20">Autobiography of a Yogi</a> by  Paramahansa Yogananda</li>
</ul>
<p>Music</p>
<ul>
<li><a href="http://www.amazon.com/s/?url=search-alias%3Daps&#038;field-keywords=Is+This+It&#038;tag=chiarg-20">Is This It</a> by The Strokes</li>
<li><a href="http://www.amazon.com/s/?url=search-alias%3Daps&#038;field-keywords=Geogaddi&#038;tag=chiarg-20">Geogaddi</a> by Boards of Canada</li>
<li><a href="http://www.amazon.com/s/?url=search-alias%3Daps&#038;field-keywords=Tum+Mile&#038;tag=chiarg-20">Tum Mile</a> by Javed Ali, K. K., Neeraj Shridhar, and Shafqat Amanat Ali</li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://chiarg.com/?feed=rss2&amp;p=324</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smushing Popular Logos</title>
		<link>http://chiarg.com/?p=304</link>
		<comments>http://chiarg.com/?p=304#comments</comments>
		<pubDate>Fri, 01 Jan 2010 19:40:03 +0000</pubDate>
		<dc:creator>Chirag</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://chiarg.com/?p=304</guid>
		<description><![CDATA[Site Image Result Savings %Savings Gmail 8.74 KB 2.65 KB 23.29% CO2Stats 3.28 KB 5.29 KB 61.73% Twitter 5.78 KB 733 bytes 11.01% Techcrunch 1.60 KB 1.45 KB 47.5% Yahoo! News 1.26 KB 43 bytes 3.23% Facebook 2.60 KB 46 bytes 1.7% CNN 6.37 KB 1.18 KB 15%]]></description>
			<content:encoded><![CDATA[<table id="tblMain_0" style="height: 302px;" border="0" cellspacing="0" cellpadding="0" width="482">
<tbody>
<tr>
<td><strong>Site</strong></td>
<td><strong>Image</strong></td>
<td><strong>Result</strong></td>
<td><strong>Savings</strong></td>
<td><strong>%Savings</strong></td>
</tr>
<tr>
<td>Gmail</td>
<td><img src="https://mail.google.com/mail/images/2/5/logo1.png" alt="" /></td>
<td>8.74 KB</td>
<td>2.65 KB</td>
<td>23.29%</td>
</tr>
<tr>
<td>CO2Stats</td>
<td><img src="http://www.co2stats.com/prowidget.php?s=1138&amp;ref=http://news.ycombinator.com/" alt="" /></td>
<td>3.28 KB</td>
<td>5.29 KB</td>
<td>61.73%</td>
</tr>
<tr>
<td>Twitter</td>
<td><img src="http://a0.twimg.com/a/1262230172/images/twitter_logo_header.png" alt="" /></td>
<td>5.78 KB</td>
<td>733 bytes</td>
<td>11.01%</td>
</tr>
<tr>
<td>Techcrunch</td>
<td><img src="http://cache0.techcrunch.com/wp-content/themes/techcrunchmu/images/logos_small/techcrunch2.png" alt="" width="130" height="19" /></td>
<td>1.60 KB</td>
<td>1.45 KB</td>
<td>47.5%</td>
</tr>
<tr>
<td>Yahoo! News</td>
<td><img src="http://l.yimg.com/a/i/brand/purplelogo/uh/us/news.gif" alt="" width="125" height="15" /></td>
<td>1.26 KB</td>
<td>43 bytes</td>
<td>3.23%</td>
</tr>
<tr>
<td>Facebook</td>
<td><img src="http://b.static.ak.fbcdn.net/rsrc.php/z81XI/hash/5yqqx3il.gif" alt="" width="128" height="27" /></td>
<td>2.60 KB</td>
<td>46 bytes</td>
<td>1.7%</td>
</tr>
<tr>
<td>CNN</td>
<td><img src="http://i.cdn.turner.com/cnn/.element/img/3.0/global/header/hdr-main.gif" alt="" width="88" height="60" /></td>
<td>6.37 KB</td>
<td>1.18 KB</td>
<td>15%</td>
</tr>
</tbody>
</table>]]></content:encoded>
			<wfw:commentRss>http://chiarg.com/?feed=rss2&amp;p=304</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Go buy the new Radiohead song &#8220;Harry Pa&#8230;</title>
		<link>http://chiarg.com/?p=303</link>
		<comments>http://chiarg.com/?p=303#comments</comments>
		<pubDate>Thu, 06 Aug 2009 19:40:23 +0000</pubDate>
		<dc:creator>Chirag</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[radiohead]]></category>

		<guid isPermaLink="false">http://chiarg.com/?p=303</guid>
		<description><![CDATA[Go buy the new Radiohead song &#8220;Harry Patch (in memory of)&#8221; here: http://download.waste.uk.com/Store/did.html]]></description>
			<content:encoded><![CDATA[<p>Go buy the new Radiohead song &#8220;Harry Patch (in memory of)&#8221; here: <a href="http://download.waste.uk.com/Store/did.html" rel="nofollow">http://download.waste.uk.com/Store/did.html</a></p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/xZAIZjc4rUc&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/xZAIZjc4rUc&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>]]></content:encoded>
			<wfw:commentRss>http://chiarg.com/?feed=rss2&amp;p=303</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The man with two brains! http:&#8230;</title>
		<link>http://chiarg.com/?p=125</link>
		<comments>http://chiarg.com/?p=125#comments</comments>
		<pubDate>Fri, 17 Jul 2009 18:34:26 +0000</pubDate>
		<dc:creator>Chirag</dc:creator>
		
		<guid isPermaLink="false">http://chiarg.com/?p=125</guid>
		<description><![CDATA[The man with two brains! http://www.wimp.com/twobrained/]]></description>
			<content:encoded><![CDATA[<p>The man with two brains! <a href="http://www.wimp.com/twobrained/" rel="nofollow">http://www.wimp.com/twobrained/</a></p>]]></content:encoded>
			<wfw:commentRss>http://chiarg.com/?feed=rss2&amp;p=125</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Planet Earth Time Lapse + The &#8230;</title>
		<link>http://chiarg.com/?p=127</link>
		<comments>http://chiarg.com/?p=127#comments</comments>
		<pubDate>Sun, 12 Jul 2009 21:16:02 +0000</pubDate>
		<dc:creator>Chirag</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://chiarg.com/?p=127</guid>
		<description><![CDATA[Planet Earth Time Lapse + The Album Leaf (The outer banks): http://bit.ly/zf0VC]]></description>
			<content:encoded><![CDATA[<p>Planet Earth Time Lapse + The Album Leaf (The outer banks): <a href="http://bit.ly/zf0VC" rel="nofollow">http://bit.ly/zf0VC</a><br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/maN9MjfRadM&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/maN9MjfRadM&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>]]></content:encoded>
			<wfw:commentRss>http://chiarg.com/?feed=rss2&amp;p=127</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My favorite in the authors@goo&#8230;</title>
		<link>http://chiarg.com/?p=131</link>
		<comments>http://chiarg.com/?p=131#comments</comments>
		<pubDate>Tue, 07 Jul 2009 22:38:25 +0000</pubDate>
		<dc:creator>Chirag</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://chiarg.com/?p=131</guid>
		<description><![CDATA[My favorite in the authors@google series &#8211; &#8220;interactions between faith and science&#8221; http://bit.ly/IOUTt]]></description>
			<content:encoded><![CDATA[<p>My favorite in the authors@<a href="http://twitter.com/google">google</a> series &#8211; &#8220;interactions between faith and science&#8221; <a href="http://bit.ly/IOUTt" rel="nofollow">http://bit.ly/IOUTt</a><br />
<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/JPpk-1btGZk&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/JPpk-1btGZk&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>]]></content:encoded>
			<wfw:commentRss>http://chiarg.com/?feed=rss2&amp;p=131</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>F14 Tomcat &#8211; http://www.youtube.com/watc&#8230;</title>
		<link>http://chiarg.com/?p=121</link>
		<comments>http://chiarg.com/?p=121#comments</comments>
		<pubDate>Mon, 22 Jun 2009 07:09:53 +0000</pubDate>
		<dc:creator>Chirag</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[flying]]></category>

		<guid isPermaLink="false">http://chiarg.com/?p=121</guid>
		<description><![CDATA[F14 Tomcat &#8211; http://www.youtube.com/watch?v=V8rZWw9HE7o (Highway to the Dangerzone) Lockheed SR-71 Blackbird &#8211; http://www.youtube.com/watch?v=BlJNYxoBX6w (Pink Floyd, Learning to Fly)]]></description>
			<content:encoded><![CDATA[<p>F14 Tomcat &#8211; <a href="http://www.youtube.com/watch?v=V8rZWw9HE7o" rel="nofollow">http://www.youtube.com/watch?v=V8rZWw9HE7o</a> (Highway to the Dangerzone)<br />
Lockheed SR-71 Blackbird  &#8211; <a href="http://www.youtube.com/watch?v=BlJNYxoBX6w" rel="nofollow">http://www.youtube.com/watch?v=BlJNYxoBX6w</a> (Pink Floyd, Learning to Fly)</p>]]></content:encoded>
			<wfw:commentRss>http://chiarg.com/?feed=rss2&amp;p=121</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YQL OpenSocial Client</title>
		<link>http://chiarg.com/?p=117</link>
		<comments>http://chiarg.com/?p=117#comments</comments>
		<pubDate>Sun, 31 May 2009 19:47:50 +0000</pubDate>
		<dc:creator>Chirag</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://chiarg.com/?p=117</guid>
		<description><![CDATA[Here is a YQL open data table that allows developers to use SQL-like
SELECT syntax on top of the OpenSocial REST people API.]]></description>
			<content:encoded><![CDATA[<p>Here is a YQL open data table that allows developers to use SQL-like<br />
SELECT syntax on top of the OpenSocial REST people API.</p>
<p>Note: This open data table only covers the people API and needs some<br />
more work to be useful for developers. Also, it requires the HTTPS<br />
protocol since private keys are being transmitted.</p>
<p>Example query: <a href="http://tinyurl.com/qnfnzn" rel="nofollow">http://tinyurl.com/qnfnzn</a> (Uses the guid, ck, and cks<br />
from the sample code in the opensocial php client)</p>
<p>Source code for the opensocial.people open data table:</p>
<p><a href="http://github.com/chirags/yql-tables/blob/d1f5d12d6e8d5e7d9424db5c869082abfcd469cd/opensocial/opensocial.people.xml" rel="nofollow">http://github.com/chirags/yql-tables/blob/d1f5d12d6e8d5e7d9424db5c869082abfcd469cd/opensocial/opensocial.people.xml</a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;?</span>xml version<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;1.0&quot;</span> encoding<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;UTF-8&quot;</span> <span style="color: #339933;">?&gt;</span>
<span style="color: #339933;">&lt;</span>table xmlns<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://query.yahooapis.com/v1/schema/table.xsd&quot;</span> https<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;true&quot;</span><span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>meta<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>author<span style="color: #339933;">&gt;</span>Chirag Shah<span style="color: #339933;">&lt;/</span>author<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;/</span>meta<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>bindings<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>select itemPath<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span> produces<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;XML&quot;</span><span style="color: #339933;">&gt;</span>
      <span style="color: #339933;">&lt;</span>urls<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>url<span style="color: #339933;">&gt;</span>http<span style="color: #339933;">:</span><span style="color: #006600; font-style: italic;">//sandbox.orkut.com/social/rest/people/&lt;/url&gt;</span>
      <span style="color: #339933;">&lt;/</span>urls<span style="color: #339933;">&gt;</span>
      <span style="color: #339933;">&lt;</span>inputs<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>key id<span style="color: #339933;">=</span><span style="color: #3366CC;">'method'</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">'xs:string'</span> paramType<span style="color: #339933;">=</span><span style="color: #3366CC;">'variable'</span> <span style="color: #003366; font-weight: bold;">const</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;true&quot;</span> <span style="color: #003366; font-weight: bold;">default</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;opensocial.people&quot;</span> <span style="color: #339933;">/&gt;</span>
        <span style="color: #339933;">&lt;</span>key id<span style="color: #339933;">=</span><span style="color: #3366CC;">'ck'</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">'xs:string'</span> paramType<span style="color: #339933;">=</span><span style="color: #3366CC;">'variable'</span> required<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;true&quot;</span> <span style="color: #339933;">/&gt;</span>
        <span style="color: #339933;">&lt;</span>key id<span style="color: #339933;">=</span><span style="color: #3366CC;">'cks'</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">'xs:string'</span> paramType<span style="color: #339933;">=</span><span style="color: #3366CC;">'variable'</span> required<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;true&quot;</span> <span style="color: #339933;">/&gt;</span>
        <span style="color: #339933;">&lt;</span>key id<span style="color: #339933;">=</span><span style="color: #3366CC;">'guid'</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">'xs:string'</span> paramType<span style="color: #339933;">=</span><span style="color: #3366CC;">'variable'</span> required<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;true&quot;</span> <span style="color: #339933;">/&gt;</span>
        <span style="color: #339933;">&lt;</span>key id<span style="color: #339933;">=</span><span style="color: #3366CC;">'selector'</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">'xs:string'</span> paramType<span style="color: #339933;">=</span><span style="color: #3366CC;">'variable'</span> required<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;true&quot;</span> <span style="color: #339933;">/&gt;</span>
        <span style="color: #339933;">&lt;</span>key id<span style="color: #339933;">=</span><span style="color: #3366CC;">'count'</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">'xs:string'</span> paramType<span style="color: #339933;">=</span><span style="color: #3366CC;">'variable'</span> required<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;true&quot;</span> <span style="color: #003366; font-weight: bold;">default</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;20&quot;</span> <span style="color: #339933;">/&gt;</span>
        <span style="color: #339933;">&lt;</span>key id<span style="color: #339933;">=</span><span style="color: #3366CC;">'container'</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">'xs:string'</span> paramType<span style="color: #339933;">=</span><span style="color: #3366CC;">'variable'</span> required<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;true&quot;</span> <span style="color: #339933;">/&gt;</span>
      <span style="color: #339933;">&lt;/</span>inputs<span style="color: #339933;">&gt;</span>
      <span style="color: #339933;">&lt;</span>execute<span style="color: #339933;">&gt;&lt;!</span><span style="color: #009900;">&#91;</span>CDATA<span style="color: #009900;">&#91;</span>
        <span style="color: #006600; font-style: italic;">// Include the signing library</span>
        y.<span style="color: #660066;">include</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://oauth.googlecode.com/svn/code/javascript/oauth.js&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        y.<span style="color: #660066;">include</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://oauth.googlecode.com/svn/code/javascript/sha1.js&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> base<span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>container <span style="color: #339933;">==</span> <span style="color: #3366CC;">'orkut'</span><span style="color: #009900;">&#41;</span> 
            base <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://sandbox.orkut.com/social/rest/people/'</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>container <span style="color: #339933;">==</span> <span style="color: #3366CC;">'friendconnect'</span><span style="color: #009900;">&#41;</span>
            base <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://www.google.com/friendconnect/api/people/'</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">else</span>
            base <span style="color: #339933;">=</span>  <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> requestUrl <span style="color: #339933;">=</span> base <span style="color: #339933;">+</span> guid <span style="color: #339933;">+</span> <span style="color: #3366CC;">'/@'</span> <span style="color: #339933;">+</span> selector <span style="color: #339933;">+</span> <span style="color: #3366CC;">'/'</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> accessor <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>consumerSecret<span style="color: #339933;">:</span> cks<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> message <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
            method<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span>
            action<span style="color: #339933;">:</span> requestUrl<span style="color: #339933;">,</span>
            parameters<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'oauth_signature_method'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'HMAC-SHA1'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
                <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'oauth_consumer_key'</span><span style="color: #339933;">,</span> ck<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
                <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'oauth_version'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'1.0'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
                <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'xoauth_requestor_id'</span><span style="color: #339933;">,</span> guid<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
                <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'format'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'json'</span><span style="color: #009900;">&#93;</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
        OAuth.<span style="color: #660066;">setTimestampAndNonce</span><span style="color: #009900;">&#40;</span>message<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        OAuth.<span style="color: #660066;">setParameter</span><span style="color: #009900;">&#40;</span>message<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;oauth_timestamp&quot;</span><span style="color: #339933;">,</span> OAuth.<span style="color: #660066;">timestamp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        OAuth.<span style="color: #660066;">SignatureMethod</span>.<span style="color: #660066;">sign</span><span style="color: #009900;">&#40;</span>message<span style="color: #339933;">,</span> accessor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> finalRequestUrl <span style="color: #339933;">=</span> OAuth.<span style="color: #660066;">addToURL</span><span style="color: #009900;">&#40;</span>message.<span style="color: #660066;">action</span><span style="color: #339933;">,</span> message.<span style="color: #660066;">parameters</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        response.<span style="color: #660066;">object</span> <span style="color: #339933;">=</span> y.<span style="color: #660066;">rest</span><span style="color: #009900;">&#40;</span>finalRequestUrl<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">response</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;&lt;/</span>execute<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;/</span>select<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;/</span>bindings<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>table<span style="color: #339933;">&gt;</span></pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://chiarg.com/?feed=rss2&amp;p=117</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[python] Post a list of links to delicious</title>
		<link>http://chiarg.com/?p=104</link>
		<comments>http://chiarg.com/?p=104#comments</comments>
		<pubDate>Mon, 23 Mar 2009 04:15:34 +0000</pubDate>
		<dc:creator>Chirag</dc:creator>
				<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://chiarg.com/?p=104</guid>
		<description><![CDATA[Simple script to post a list of links to delicious, along with the related tags for that link. Yes, I also wish delicious.com supported OAuth import os, urllib, urllib2, time, sys from BeautifulSoup import BeautifulSoup from BeautifulSoup import BeautifulStoneSoup &#160; user = 'insert_the_user_name' pasw = 'insert_the_password' password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm&#40;&#41; password_manager.add_password&#40;None, 'https://api.del.icio.us/', user, pasw&#41; auth_handler = [...]]]></description>
			<content:encoded><![CDATA[<p>Simple script to post a list of links to delicious, along with the related tags for that link.<br />
Yes, I also wish <a href="http://delicious.com">delicious.com</a> supported <a href="http://oauth.net">OAuth</a></p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>, <span style="color: #dc143c;">urllib</span>, <span style="color: #dc143c;">urllib2</span>, <span style="color: #dc143c;">time</span>, <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">from</span> BeautifulSoup <span style="color: #ff7700;font-weight:bold;">import</span> BeautifulSoup
<span style="color: #ff7700;font-weight:bold;">from</span> BeautifulSoup <span style="color: #ff7700;font-weight:bold;">import</span> BeautifulStoneSoup
&nbsp;
<span style="color: #dc143c;">user</span> = <span style="color: #483d8b;">'insert_the_user_name'</span>
pasw = <span style="color: #483d8b;">'insert_the_password'</span>
password_manager = <span style="color: #dc143c;">urllib2</span>.<span style="color: black;">HTTPPasswordMgrWithDefaultRealm</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
password_manager.<span style="color: black;">add_password</span><span style="color: black;">&#40;</span><span style="color: #008000;">None</span>, <span style="color: #483d8b;">'https://api.del.icio.us/'</span>, <span style="color: #dc143c;">user</span>, pasw<span style="color: black;">&#41;</span>
auth_handler = <span style="color: #dc143c;">urllib2</span>.<span style="color: black;">HTTPBasicAuthHandler</span><span style="color: black;">&#40;</span>password_manager<span style="color: black;">&#41;</span>
opener = <span style="color: #dc143c;">urllib2</span>.<span style="color: black;">build_opener</span><span style="color: black;">&#40;</span>auth_handler<span style="color: black;">&#41;</span>
<span style="color: #dc143c;">urllib2</span>.<span style="color: black;">install_opener</span><span style="color: black;">&#40;</span>opener<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> url <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'./all_links.txt'</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">try</span>:
        title = <span style="color: #dc143c;">urllib</span>.<span style="color: black;">quote</span><span style="color: black;">&#40;</span>BeautifulSoup<span style="color: black;">&#40;</span><span style="color: #dc143c;">urllib</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span>url<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>.<span style="color: black;">title</span>.<span style="color: #dc143c;">string</span><span style="color: black;">&#41;</span>
        url = <span style="color: #dc143c;">urllib</span>.<span style="color: black;">quote</span><span style="color: black;">&#40;</span>url<span style="color: black;">&#41;</span>
        tags = <span style="color: #483d8b;">&quot;hn_links&quot;</span>
        <span style="color: #ff7700;font-weight:bold;">for</span> suggestion <span style="color: #ff7700;font-weight:bold;">in</span> BeautifulSoup<span style="color: black;">&#40;</span> <span style="color: #dc143c;">urllib2</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;https://api.del.icio.us/v1/posts/suggest?url=%s&quot;</span> <span style="color: #66cc66;">%</span> url<span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>.<span style="color: black;">findAll</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'popular'</span><span style="color: black;">&#41;</span>:
            tags = tags + <span style="color: #483d8b;">&quot;+&quot;</span> + suggestion.<span style="color: #dc143c;">string</span>
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #dc143c;">urllib2</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;https://api.del.icio.us/v1/posts/add?url=%s&amp;tags=%s&amp;description=%s&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>url, tags, title<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        <span style="color: #dc143c;">time</span>.<span style="color: black;">sleep</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">9</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">except</span>:
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">exc_info</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://chiarg.com/?feed=rss2&amp;p=104</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
