Tweeting to my friends in IRC

Just finished a script, that enables me or anyone else who cares to send tweets directly to a IRC-Channel. The script is powered by the best IRC-Client ever made, perl, and Net::Twitter::Lite. Update [2023-08-18]: Nobody should use twitter or perl or irc any more ;) Update [2013-06-15]: upgrade to Net::Twitter::Lite::WithAPIv1_1 Update [2013-01-12]: second update today added the setting “_count” and some cleanups with vars and setup Update [2013-01-12]: drastically reduced the amout of requests to the API P....

2013-01-11 · 5 min · 1053 words · Jan

Ease up HTTP-GET with perl's LWP::UserAgent

I was just writing a small script for automatizing something via a REST-API and I had to manually add an authorization to all my GET-Requests, which really annoyed me. (it was not Realm-sensitive, so I couldn’t set up auth in the UA itself). So I wrote this small sub I would like to share: #getrequests shorthand sub getReq { my ( $url, $username, $password ) = @_; my $req = HTTP::Request->new( GET => $url ); if ( $username && $password ) { $req->authorization_basic( $username, $password ); } my $res = $ua->request($req); if ( $res->is_success ) { return $res; } else { warn $res->status_line; return undef; } } All you need to call a HTTP-Base-Auth’d site now is:...

2012-12-21 · 1 min · 143 words · Jan

A Journey through the web

Today I do not have very much to do at work. I am not moaning about it, I would just like to point out that my actual team has a very strict “don’t change anything that works before a holiday or the weekend”-policy, this is a very good policy, but it leads to personal downtimes on fridays and the days before holidays for obvious reasons that I like to fill with personal development....

2012-10-02 · 3 min · 444 words · Jan

Generating proper XML with Perl

Once upon a time I was asked by one of our javadevelopers if i can send a csv in proper xml to one of his webservices. Of course I can. As usual i decided to use perl and Text::CSV to read in the CSV as well as LWP::UserAgent to send the xml to the (soap-)webservice. After having a second look on the code, where I put in several nodes at the fourth level of the xml-tree, managing all the intents just via print, I found myself doing something like this:...

2011-11-22 · 2 min · 376 words · Jan