<?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>Stereonaut! &#187; rubx</title>
	<atom:link href="http://stereonaut.net/tag/rubx/feed/" rel="self" type="application/rss+xml" />
	<link>http://stereonaut.net</link>
	<description>A weblog by David Moreno.</description>
	<lastBuildDate>Mon, 23 Aug 2010 00:45: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>Cheating the world you tweet less</title>
		<link>http://stereonaut.net/cheating-the-world-you-tweet-less/</link>
		<comments>http://stereonaut.net/cheating-the-world-you-tweet-less/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 21:41:56 +0000</pubDate>
		<dc:creator>David Moreno</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[planeta linux]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[rubx]]></category>

		<guid isPermaLink="false">http://log.damog.net/?p=887</guid>
		<description><![CDATA[The number of updates on my Twitter page kind of bothers me sometimes. It&#039;s a reminder of the amount of time I&#039;ve spent and wasted on Twitter, it&#039;s an ever-itching mole in front of my face. However, I can cheat the system and society and still feel good about myself. What if I just remove [...]]]></description>
			<content:encoded><![CDATA[<p>The number of updates on my <a href="http://twitter.com/damog">Twitter page</a> kind of <strong>bothers me</strong> sometimes. It&#039;s a reminder of the amount of time I&#039;ve spent and wasted on Twitter, it&#039;s an ever-itching mole in front of my face. However, I can cheat the system and society and still feel good about myself. What if I just remove all freaking replies I&#039;ve made, <em>except</em> for those of people I do care about (like <a href="http://maggit.net">my fiance</a> or <a href="http://twitter.com/rubx">Ruby Boobie</a>)? And also, I don&#039;t want to remove very recent replies.</p>
<p>Well, let&#039;s just do it already.</p>
<pre class="brush: perl">
#!/opt/local/bin/perl

use Modern::Perl;

use Net::Twitter;
use DateTime::Format::DateParse;
use DateTime;

binmode STDOUT, &quot;:utf8&quot;;

my $t = Net::Twitter-&gt;new(
    user =&gt; shift @ARGV || &#039;lazy_fuck&#039;,
    password =&gt; shift @ARGV || &#039;bl0wm3&#039;);

my $whitelist = [qw/maggit rubx axiombox/];

my $then = DateTime-&gt;now;
$then-&gt;subtract(days =&gt; 5);

my $x = 1;
for my $i (1..80) {

    my $tweets = $t-&gt;user_timeline({ page =&gt; $i, count =&gt; 200 })
        or die &quot;No fish for you, loser.\n&quot;;

    for my $h (@$tweets) {
        next unless $h-&gt;{&quot;in_reply_to_screen_name&quot;};
        next if grep { $_ eq $h-&gt;{&quot;in_reply_to_screen_name&quot;} } @$whitelist;

        my $date = DateTime::Format::DateParse-&gt;parse_datetime($h-&gt;{&quot;created_at&quot;});
        next unless $date &lt; $then;

        say $x, &quot;: (&quot;, $h-&gt;{&quot;id&quot;}, &quot;) &quot;, $h-&gt;{&quot;text&quot;};
        $t-&gt;destroy_status($h-&gt;{&quot;id&quot;});
        $x++;
    }
}
</pre>
<p>This little fucker will try to fetch your latest 16&#039;000 tweets (if you have&#8230; <em>twat</em>, *grin*, more than that, you&#039;ve got real issues and I cannot help there, get a shrink or something).</p>
<p>It&#039;ll make 80 requests for your timeline (remember Twitter gives you a 100-request hour limit), so only if the reply doesn&#039;t come from a certain people AND the reply is older than a given period of time (I&#039;m setting it to one week for me), it&#039;ll get rid of it. If a friend doesn&#039;t see the reply in a week, she probably never will. After that, it just destroys the tweet (or it tries at least, from my experience, Twitter is still experimenting a hell lot of issues on their service).</p>
<p>That way you can cheat the system removing useless tweets that no one (not even you or the recipient) cares about anymore. Or just&#8230; don&#039;t give a shit, and you are all set too.</p>
<p>The first time I ran it, I went from like 6k tweets to 2500, which was a nice drop <img src='http://stereonaut.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . If you feel like it, just grab it and customize to fit your needs. You will be needing the <a href="http://search.cpan.org">CPAN</a> modules <a href="http://search.cpan.org/dist/Modern-Perl">Modern::Perl</a>, <a href="http://search.cpan.org/dist/DateTime">DateTime</a>, <a href="http://search.cpan.org/dist/DateTime-Format-DateParse">DateTime::Format::DateParse</a> and of course, <a href="http://search.cpan.org/dist/Net-Twitter">Net::Twitter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stereonaut.net/cheating-the-world-you-tweet-less/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Rubx: Twitter&#039;s Ruby shell</title>
		<link>http://stereonaut.net/rubx-twitters-ruby-shell/</link>
		<comments>http://stereonaut.net/rubx-twitters-ruby-shell/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 14:32:05 +0000</pubDate>
		<dc:creator>David Moreno</dc:creator>
				<category><![CDATA[axiombox]]></category>
		<category><![CDATA[planet-debian]]></category>
		<category><![CDATA[planeta linux]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[rubx]]></category>
		<category><![CDATA[tli]]></category>

		<guid isPermaLink="false">http://log.damog.net/?p=850</guid>
		<description><![CDATA[Rubx, also known as Ruby Boobie, is a nice spoiled girlie bot that runs on Twitter. She listens when you talk to her and when you do, it&#039;ll better be with Ruby: She will interpret your tweet in Ruby and reply to you with what your code returns. How does it work? You send a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://axiombox.com/rubx"><img align="right" class="alignright size-full wp-image-851" title="rubx" src="http://log.damog.net/wp-content/uploads/2009/04/rubx.png" alt="rubx" width="100" height="100" />Rubx</a>, also known as <em>Ruby Boobie</em>, is a nice spoiled girlie bot that runs on Twitter. She listens when you talk to her and when you do, it&#039;ll better be with Ruby: She will interpret your tweet in Ruby and reply to you with what your code returns.</p>
<p>How does it work? You send a message to her:</p>
<blockquote><p><tt>@rubx "The day I was born it was a " &lt;&lt; Time.local(1984, "aug", 8).strftime("%A")</tt></p></blockquote>
<p>And @<a href="http://twitter.com/rubx">rubx</a> will reply:</p>
<blockquote><p><tt>@damog "The day I was born it was a Wednesday"</tt></p></blockquote>
<p>Go see more about her (examples, FAQ, etc) on <a href="http://axiombox.com/rubx">axiombox.com/rubx</a> or on her <a href="http://twitter.com/rubx">Twitter profile</a>.</p>
<p>As we tested the hack, a bunch of people started interacting with Rubx too, <a href="http://twitter.com/anibalrojas/status/1455257553">some people</a> calling her <em>Twitter Line Interface Ruby Interpreter</em>! <img src='http://stereonaut.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . See what other people has tried with her <a href="http://search.twitter.com/search?q=%40rubx">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stereonaut.net/rubx-twitters-ruby-shell/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
