Showing posts with label ironman. Show all posts
Showing posts with label ironman. Show all posts

Sunday, June 20, 2010

Make your desktop background a live world shot

cron this to run every 30 or 60 minutes and you have a world image updated with sun position and weather.


#!/usr/bin/env perl

use LWP::Simple;

my %image_hash = ( 'world_sunlight.jpg' => 'http://www.opentopia.com/images/cams/world_sunlight_map_rectangular.jpg',
# 'world_weather.gif' => "http://images.intellicast.com/WeatherImg/Satellite/world.gif"
);

foreach my $file (keys %image_hash) {
getstore($image_hash{$file}, $file);
}


Hopefully we don't kill the server that produces these shots.

Wednesday, May 12, 2010

Looking for Crypt::RIPEMD160 Author

I tried to contact the Crypt::RIPEMD160 author today, as well as a bunch of people listed in the README, etc. 5 of the 8 emails bounced immediately. There's a 64bit bug in the module that is causing issues with Crypt::OpenPGP.

Their name is Christian H. Geuer-Pollmann or CHGEUER in pause. If anyone knows how to contact them, I'd like to help fix some of the bugs in this module

Todd

Thursday, May 6, 2010

Looking for Net::Ident author

I tried to contact the Net::Ident author 8 days ago.

Their name is Jan-Pieter Cornet or JPC in pause. If anyone knows how to contact them, I'd like to help fix some of the bugs in this module

So far, I've tried their cpan.org email address and johnpc -- at -- xs4all.nl, but I've gotten no response
Todd

Friday, March 26, 2010

Looking for Net::Daemon author

I just tried to contact the Net::Daemon author - Malcolm H. Nooning

All of the emails I could find for him are bouncing. If anyone knows how to contact him, I'd like to help fix some of the bugs in this module

Todd

Monday, March 22, 2010

Looking for MIA CPAN Authors


I've been looking for the authors of the following modules that are in need of some minor maintenance. Most of the modules have RT queues untouched for multiple years.

If anyone knows how to reach them, please let me know.

Business::UPS - MSOLOMON@cpan.org, jwheeler@cpan.org -- jwheeler's email is bouncing.
Net::AIM - aryeh@cpan.org, perlaim@aryeh.net -- All emails bouncing
Safe::Hole - nakajima@netstock.co.jp, SEYN@cpan.org -
IO::Stty - tex@habit.com, auschutz@cpan.org -- All emails bouncing.

Dated CPAN modules need TLC

So lately, I've been trying to help the perl community by fixing modules that have had their RT queue neglected because the author has gone MIA. This requires I take over the module to fix what needs fixing. In order to take over a module, you need to do the following:

1. Open RT tickets about the issues you are having in the appropriate queue.
2. Email the author(s) with as many email addresses as you can determine, cc'ing modules@cpan.org
3. Publicly post that you're looking for the author in a frequented blog source
4. It doesn't hurt to post to perl monks either.

If all of this fails and multiple weeks go by, modules@perl.org will hook you up.

This is summarized from The PAUSE FAQ

I'll be doing this for a few modules over the next few months that have been bothering me because they have one thing or the other out of date. I've also been writing a dependency tracker for my own purposes, using the META.yml files that come with modules. A surprising amount of modules do not have a proper META.yml file.

I've already started this process on a few modules. Where I could contact the authors, I've found them to be helpful in most cases. In some cases, they fix what I had an issue with. In other cases, they just pass the PAUSE baton on to me and I can fix it myself.

Thursday, February 11, 2010

Net::Jabber::Bot in the news

Ask any CPAN author. It's rewarding and frightening at the same time to hear people mention they're using your CPAN module:

Richard Wallman mentioned Net::Jabber::Bot in his blog today

inverting a hash

Code I've written in the past to swap keys and values

my %hash = ( foo => bar, ... fee=>fo);
my %reversed_hash;
foreach my $key (keys %hash) {
$reversed_hash{$hash{$key}} = $key;
}


or... I could have just done this all along.
%hash = reverse %hash;


When you think of how this works by treating the hash as an array of key/value pairs then just reversing the order of the array, it initially feels somehow "dirty". But give it a few minutes and you realize it's really a frickin elegant solution!

Friday, July 3, 2009

How to kill your system by allocating all memory in perl

Sometimes you want to see how things behave on a host when it runs out of memory

We actually caused a linux host with 128GB RAM to hang until we pulled the plug by doing this.

To allocate more memory, change $procs to a bigger number. If you have 64bit perl, you can kill the host with 1 process, just concatenating strings with the subroutine below.


#!perl
use forks;

my $procs = 2;
for (1..$procs) {
print "Forking: " . `date`;
threads->new(\&mem_load);
}
print "sleeping: " . `date`;
sleep 10;


sub mem_load {
my $str = "0123456789abcdef" x 1024;
$str = $str x 1024;

my $mem = $str;
for (1..130) {
$mem .= $str;
print "$$: $_\n";
}
sleep 9999999;
}

How to create high CPU load in perl

Sometimes you need to test how a host behaves when it's bogged down.

This code is fairly safe. Change $procs to a big number if you want to see it kill your host.


#!perl
use forks;

my $procs = 2;
for (1..$procs) {
threads->new(\&fpu_load);
threads->new(\&cpu_load);
}
sleep 100;

sub fpu_load {
my ($f1, $f2, $sum);
while(1) {
$f1 = rand(1000);
$f2 = rand(1000);
$sum = $f1 * $f2;
}
}

sub cpu_load {
my ($f1, $f2, $sum);
while(1) {
$f1 = rand(1000);
$f2 = rand(1000);
$sum = $f1 * $f2;
}
}