<?xml version="1.0" encoding="UTF-8"?>
<codes type="array">
  <code>
    <code>&lt;html&gt;
&lt;head&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-latest.pack.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
	$(document).ready( function() {
	
		var url = &quot;http://twitter.com/status/user_timeline/RedWolves.json?count=3&amp;callback=?&quot;;
		$.getJSON(url,
        function(data){
			$.each(data, function(i, item) {
				$(&quot;img#profile&quot;).attr(&quot;src&quot;, item.user[&quot;profile_image_url&quot;]); 
				$(&quot;#tweets ul&quot;).append(&quot;&lt;li&gt;&quot; + item.text.linkify() + &quot; &lt;span class='created_at'&gt;&quot; + relative_time(item.created_at) + &quot; via &quot; + item.source + &quot;&lt;/span&gt;&lt;/li&gt;&quot;);
			});
        });
	});
	
	String.prototype.linkify = function() {
		return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&amp;\?\/.=]+/, function(m) {
    return m.link(m);
  });
 }; 
  function relative_time(time_value) {
	  var values = time_value.split(&quot; &quot;);
	  time_value = values[1] + &quot; &quot; + values[2] + &quot;, &quot; + values[5] + &quot; &quot; + values[3];
	  var parsed_date = Date.parse(time_value);
	  var relative_to = (arguments.length &gt; 1) ? arguments[1] : new Date();
	  var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
	  delta = delta + (relative_to.getTimezoneOffset() * 60);
	  
	  var r = '';
	  if (delta &lt; 60) {
	    r = 'a minute ago';
	  } else if(delta &lt; 120) {
	    r = 'couple of minutes ago';
	  } else if(delta &lt; (45*60)) {
	    r = (parseInt(delta / 60)).toString() + ' minutes ago';
	  } else if(delta &lt; (90*60)) {
	    r = 'an hour ago';
	  } else if(delta &lt; (24*60*60)) {
	    r = '' + (parseInt(delta / 3600)).toString() + ' hours ago';
	  } else if(delta &lt; (48*60*60)) {
	    r = '1 day ago';
	  } else {
	    r = (parseInt(delta / 86400)).toString() + ' days ago';
	  }
	  
	  return r;
}
function twitter_callback ()
{
	return true;
}

&lt;/script&gt;	
&lt;/head&gt;
&lt;body&gt;
	&lt;div id=&quot;tweets&quot;&gt;
		&lt;img id=&quot;profile&quot;&gt;
		&lt;ul&gt;&lt;/ul&gt;
	&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</code>
    <created-at type="datetime">2009-05-10T18:27:20Z</created-at>
    <description>http://ralphwhitbeck.com/content/binary/twitter-json-jquery.html</description>
    <id type="integer">176</id>
    <language-id type="integer">16</language-id>
    <privated type="boolean">false</privated>
    <title>jquery twitter</title>
    <updated-at type="datetime">2009-05-10T18:27:20Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>&lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.2.6.pack.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.twitter.js&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!--
	$(document).ready(function() {
		$(&quot;#twitter&quot;).getTwitter({
			userName: &quot;leozera&quot;,
			numTweets: 5,
			loaderText: &quot;Loading tweets...&quot;,
			slideIn: true,
			showHeading: true,
			headingText: &quot;Latest Tweets&quot;,
			showProfileLink: true
		});
	});
//--&gt;&lt;!]]&gt;
&lt;/script&gt;

&lt;div id=&quot;twitter&quot;&gt;&lt;/div&gt;

</code>
    <created-at type="datetime">2009-01-05T00:18:30Z</created-at>
    <description>from: http://www.tidbits.com.br/download/exemplos/jquery.twitter/jquery.twitter_original.zip</description>
    <id type="integer">145</id>
    <language-id type="integer">16</language-id>
    <privated type="boolean">false</privated>
    <title>jquery twitter plugin</title>
    <updated-at type="datetime">2009-01-05T00:18:30Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>function countChars(idElement){
max_chars = 20;
counter = document.getElementById(idElement);
field = document.getElementById('text').value;
field_length = field.length;

// Calculate remaining chars
remaining_chars = max_chars-field_length;
if(remaining_chars&lt;=5){
	counter.style.color=&quot;#CC0000&quot;;
}
// Update the counter on the page
counter.innerHTML = remaining_chars;
}

// &lt;input type=&quot;input&quot; id=&quot;text&quot; onKeyUp=&quot;javascript:countChars('counter_number')&quot;/&gt; &lt;spam id=&quot;counter_number&quot;&gt;20&lt;/spam&gt;</code>
    <created-at type="datetime">2008-11-22T16:01:59Z</created-at>
    <description>http://woork.blogspot.com/2008/07/useful-tips-to-enrich-your-html-forms.html</description>
    <id type="integer">112</id>
    <language-id type="integer">19</language-id>
    <privated type="boolean">false</privated>
    <title>count chars (like twitter)</title>
    <updated-at type="datetime">2008-11-22T16:01:59Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>curl -u email:password -d status=&quot;hello world!&quot; http://twitter.com/statuses/update.xml </code>
    <created-at type="datetime">2008-11-16T13:27:30Z</created-at>
    <description></description>
    <id type="integer">100</id>
    <language-id type="integer">42</language-id>
    <privated type="boolean">false</privated>
    <title>post in twitter using curl</title>
    <updated-at type="datetime">2008-11-16T13:27:30Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>require 'rss/1.0'
require 'rss/2.0'
require 'open-uri'

content = ''
open('http://twitter.com/statuses/user_timeline/peepcode.rss').each { |i| content &lt;&lt; i }
RSS::Parser.parse(content).items.each { |i| system &quot;say \&quot;#{i.title}\&quot;&quot; }</code>
    <created-at type="datetime">2008-07-09T14:35:37Z</created-at>
    <description></description>
    <id type="integer">32</id>
    <language-id type="integer">39</language-id>
    <privated type="boolean">false</privated>
    <title>mac os reading twitter updates</title>
    <updated-at type="datetime">2008-07-09T14:35:37Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
</codes>
