Migrate a virtualbox VM to a bigger virtual disk March 18, 2012Posted by claudio in Uncategorized.
Tags: GNU/Linux, Padre, VirtualBox, Virtualization, vm
When a virtual machine has limited use, you don’t want to loose too much space. Sometimes, however, you get the size wrong.
In my case, I have a minimal Windows VM on my Ubuntu laptop. Once in a while I test an upcoming Padre (The Perl IDE) release or update a crappy usb device with Windows-only support. Win-modems may be gone, but we still have GPS devices that run GNU/Linux but can only be connected to Windows. (I guess seeing your market-share shrink because of smart-phones is what they call bad karma, TomTom.)
Windows being Windows, adding disks is a terrible experience (what’s up with the alphabet as a mounting point?) and moving a Windows installation to a second disk is a nightmare. Luckily, free software gets the job done:
1. Make sure your guest machine is halted properly. This is specially important for a NTFS (virtual) partition of a Windows VM.
2. Download Ubuntu (It does not matter if you use the 32- or the 64-bit version, other GNU/Linux distribution will work as well). The screenshots are from a Ubuntu 11.10 setup.
8. Select the new disk from the combo-box on the upper right (check the size).
Logitech Wireless Trackball M570 on Ubuntu March 1, 2012Posted by claudio in Uncategorized.
Tags: GNU/Linux, logitech, mouse, out-of-the-box, trackball, Ubuntu
A colleague working in our IT-helpdesk found an old Logitech TrackMan Wheel in his drawer. “Old” as in out-of-production model launched around 2002. The thing was good as new: the trackball was still in his original package and the documentation and CD package were sealed. The person that ordered the thing years ago didn’t get used to it after one try. Lucky me :).
So I gave it a try and wow… I have gone ergonomic! While it took some minutes to kill the reflex to move the mouse around, I got used to the trackball mechanism very fast. When I got home I ordered the heir of this model, the Wireless Trackball M570.
At its arrival, my Virtualbox Windows VM was ready to be booted in order to pair the mouse and the wireless adapter. Sadly, Logitech only provides a MS Windows and Mac OS X binary. Once paired, the interwebs agree on this, the combination works on whatever OS you connect it too.
Big was my surprise, when everything worked out of the box in Ubuntu (11.10). Logitech seem to do the right thing nowadays and the devices are already pre-paired. Letting the pairing to the customer seems medieval when you thing about it. Logitech++.
So, everything works fine. The trackball is fantastic. The only complain is that the scroll-wheel makes a cheap plasticky sound when clicked, and as a UNIX user, it’s something you do often. This new model has 2 additional buttons compared to the original TrackMan. Out of the box, they are configured as Back and Next (e.g. while browsing in Firefox).
I don’t care much about these buttons and not at al for the Back and Next function. They are out of the way, so if you don’t use them, they won’t drive you crazy. Anyway, while they are there, why not give them a shot and assign them a useful task: easystoke to the recue! (“sudo apt-get install easystroke” from the shell, or search for “easystroke” on the Ubuntu Software Center)
I configured the additional buttons as Page Up and Page Down, something I really do use often (I find it easier on the hand than using the scroll wheel). I followed the instructions from the Archlinux wiki. Being a wiki, I copy the short instructions in case it get removed or moved:
easystroke is a mouse gesture application, but it can be used to manage mouse buttons as well. It’s main advantage o-ver btnx is that it’s more versatile. On the other hand, it’s user-based, so any user has to configure it to reflect his own needs.
In order to set up easystroke to manage your extra mouse buttons, you’ll need to do this (example features Back/Forward mouse buttons) : run:easystroke -g
Go to Preferences tab > Additional buttons > Add, and add any special button.
Go to Action tab > Add action, give the new action a name, as Type choose “Key”, as Details set “Alt+Left” for Back button, “Alt+Right” for Forward button, as Stroke click the proper mouse button (confirm if a warning is displayed), and voilà! Your mouse button is configured.
I add some screen-shots for your comfort that illustrate my specific configuration. Nota Bene: to get Shift+Page Up/Down working (e.g. scrolling in a terminal), you need to add the combo to easystroke.
Be nice to me and I’ll be nice to you (ebooks) February 25, 2012Posted by claudio in Uncategorized.
Tags: DRM, ebook, o'reilly, onyx
I love it when I get a fair deal in this greedy digital world. Paying twice for the same content is something I really dislike.
Besides the content, I like chromatic’s way of doing business: you can freely download the DRM-free pdf of his book (Modern Perl) even if you don’t buy a hard copy. Guess what, I bought the book the day it came out.
Although O’Reilly does make you pay for the electronic content of a printed book you already own, they give you a very fair deal: “Upgrade to the electronic version of any print book you’ve registered at oreilly.com, for just $4.99″.
I just got the DRM-free digital version of 5 O’Reilly paper books I already own and I don’t feel cheated at all. Be careful though not to mix offers like the 5$ book “upgrade” the half price for new releases of books you own. In this case you’ll pay half price of the full ebook price instead of the 5 $.
This is how you make customers happy. Treat me with respect and I won’t mind sending some money your way once in a while.
Perl devroom @ FOSDEM2012 February 3, 2012Posted by claudio in Uncategorized.
Tags: dev-room, fosdem, FOSDEM2012, Perl
add a comment
Just a short reminder of the Perl talks at FOSDEM2012.
The Perl dev-room will be held this Sunday February 5th, from 9 to 17h on room AW1.121. We have a wide range of talks. Some talks target Perl programmers with subjects ranging from a beginner to an advanced level. Other talks don’t focus on the language itself, but rather on projects that use Perl as a building stone.
So please, drop by if you are at FOSDEM…
|Welcome to the Perl devroom||Claudio Ramirez||AW1.121||09:00-09:05|
|Moose Primer||Nicholas Perez||AW1.121||09:05-09:25|
|Advanced Moose Techniques||Nicholas Perez||AW1.121||09:35-09:55|
|Perlude: a taste of Haskell in Perl||Marc Chantreux||AW1.121||10:05-10:45|
|The LemonLDAP::NG Project||Clément Oudot||AW1.121||11:55-12:15|
|LedgerSMB: Open source accounting running on Perl||Erik Huelsmann||AW1.121||12:25-12:45|
|Modern PerlCommerce||Stefan Hornburg||AW1.121||13:25-14:05|
|Rapid real-world testing using git-deploy||Ævar Arnfjörð Bjarmason||AW1.121||14:15-14:35|
|The FusionInventory Project||Guillaume Rousse||AW1.121||15:50-16:10|
|Using Moose objects with Memcached||Marius Olsthoorn||AW1.121||16:20-16:40|
FOSDEM 2012 Perl dev-room: Call For Speakers December 21, 2011Posted by claudio in Uncategorized.
Tags: call for speakers, fosdem, fosdem 2012, Perl
add a comment
Taking place in the beautiful city of Brussels (Belgium), FOSDEM is the biggest free and non-commercial European event organized by and for the community. Its goal is to provide Free and Open Source developers a place to meet (see http://fosdem.org/2012/).
Over the last years the Perl community had an increasing presence at FOSDEM. Last year we managed to have both a booth and a dev-room. We collected an impressive positive return and wish to renew the experience.
Our dev-room request for this upcoming edition (2012) has already been approved (the stand request is still pending but we foresee no problems there). The stand will be open throughout the weekend. The dev-room event will take place Sunday February 5th 2012 , between 9 and 17h. The room itself has 81 seats, WIFI and a VGA projector.
This environment, being a university classroom with raised seats, lends itself perfectly for talks. This is a wonderful opportunity to present your Perl project –big and small– or talk about subjects you care about. We are looking for a variety of subjects on all levels: starter and advanced, generic and specialized, core internals and CPAN. We have 8 hours time, so we have the flexibility of using different time formats: e.g. talks of 20 minutes, more classic talks of 40 minutes or longer (although we learned from experience that longer talks should be split into slices of 20 or 40 minutes).
Please don’t doubt to send a proposal (information about yourself, subject, short description and time needed). If you have several subjects you are enthusiastic to talk about please send alternative proposals. In the case more than one talk is not selected, your proposal will help us when putting the schedule together and even have “backup” talks in case someone cancels. Also mention your time constraints (if any).
Please send your talk proposal by e-mail to the address below before January 11th, 2012. After an evaluation period we will submit a definitive schedule on Saturday 2012-01-21 to the FOSDEM organizers.
Please forward distribute this call as wide as possible (certainly to your local mongers). You can link to this page, url: http://nxadm.wordpress.com/2011/12/21/perlfosdem2012-cfs/.
Claudio Ramirez (nxadm, email: padre.claudio at apt-get.be) and the Belgian Perl Mongers.
NB1: This is a community event without sponsoring. We don’t have the means to pay for your trip and time. If you want to sponsor part of the event, please feel free to contact us.
NB2: We’ll also appreciate volunteers, booth and dev-room. Please tell us your availabilities so we can also prepare a planning for this.
Re: APOD to Desktop Wallpaper September 9, 2011Posted by claudio in Uncategorized.
Being a GNU/Linux + Gnome user myself, I post a quick and dirty “translation” of the script (e.g. to use with cron).
my $apodbase = 'http://apod.nasa.gov/';
my $dlbase = '/home/mmeyer/Downloads/';
chdir $dlbase or die "Couldnt chdir to $dlbase: $!";
my $content = get($apodbase) or die "Couldn't download image: $!";
Carp::croak 'Content doesn\'t match' unless $content =~ m/<IMG SRC="(.*)"/g;
my $urlend = $1;
Carp::croak 'No url found' unless $urlend =~ m|([^/]+)$|;
my $targ = $1;
my $status = getstore($apodbase . $urlend, $targ);
Carp::croak "Couldn't store image: $status" unless is_success($status);
my @shell_cmd = ('/usr/bin/gconftool-2', '-t', 'str', '--set', '/desktop/gnome/background/picture_filename', $dlbase . $targ);
Perl screencasts June 16, 2011Posted by claudio in Uncategorized.
Tags: gabor, Perl, perl debugger, screencast
add a comment
I found this last screencast very interesting. For a lot of people the perl debugger is something mythical, arcane or even something they even didn’t know it exists. Certainly people coming from a UNIX shell scripting background wonder how to do something similar to “set -xv” in Perl. I can tell you already: watching the screencast about the perl debugger have been the most fruitful 8 minutes I have spent on IT this week.
So, subscribe to the channel (a gmail address will do) to keep Gabor’s ego motivated to create more.
Perl 5.14.0 Solaris failing tests May 19, 2011Posted by claudio in Uncategorized.
Tags: opencsw, p5p, Perl, Solaris
In case you wonder, most failing tests are related to threading. But even when building a non-treaded version there are some failing tests (Failed 10 tests out of 1961, 99.49% okay). The threaded 32-bit version passes all the tests. The Solaris9-Sparc-64-bit-threaded perl seems to build and test fine as well, but I need to verify it (e.g. that we are testing exactly the same thing).
Ping me here in case you have this combination working. Patches to p5p are always better than bugs rapports . Mental note: “I will test the RC releases on other OSes than GNU/Linux next time”.
Tags: dual screen setup, Ubuntu, unity
I use a dual screen setup at home. On the left side I have a big lcd screen and on the right the fixed screen of the laptop (on a docking station). The big screen is my main screen, while the smaller screen is for things I like to keep open like mail or an irc session (ssh+screen+irssi).
In this new install, the unity global menu can be found on the smaller screen.This probably makes sense on a lot of setups, but I prefer this icon menu on my main screen as it feel more accessible (it’s physically closer) and it autohides anyway.
I did not find a graphical way to set this up, but editing the configuration file is very easy:
$ vi ~/.config/monitors.xml
or if you prefer a graphical editor:
Press Alt + F2 and type “gnome-text-editor ~/.config/monitors.xml”
Identify you main monitor (name, resolution, etc) and change “no” into:
Book mini-review: Modern Perl May 3, 2011Posted by claudio in Uncategorized.
Tags: book review, Chromatic, Modern Perl, Perl
Ok. You are really lazy, curious and want to know my opinion? Buy the book. It’s great. If you are less lazy, keep reading.
I was really exited about this book. Even before the book was published, chromatic regularly posted very interesting articles and, maybe more importantly, posed questions. It felt like chromatic was thinking out loud and he welcomed everyone who wanted to take part. The text for the book is open for collaboration and lively discussions took place in his blog. He goes a step further and offers the ebook and pdf version for free. It’s a good feeling to be sure that you are not buying a cat in a bag.
What kind of book is it? It’s the kind of book that it’s fun to read (sadly this is not that common in the IT world). It’s not the kind of book that offends your intellect by trying too hard to be funny nor the dry stuff that put you into sleep. It’s not a reference. It’s not a tutorial. It’s not the book a would suggest for someone who wants to learn Perl, but it certainly be the one to read after that (if your friend is serious about programming he will not stop at “Learning Perl“).
Because the pdf is freely available you can have a look yourself at the contents, but just glossing over the titles of the chapters gives you a good idea:
- The Perl Philosophy
- Perl and Its Community
- The Perl Language
- Regular Expressions and Matching
- Style and Efficacy
- Managing Real Programs
- Perl Beyond Syntax
- What to Avoid
- What’s Missing
Modern Perl is not the book that teaches you specific technologies du jour. chromatic aims higher and moves the bar from “how” to “why”. By doing so it’s clear that for the author the Modern Perl revival is more than the sum of new CPAN modules fixing what’s broken in Perl 5. It’s a book about understanding the basics of Perl 5. The good and the bad stuff. And how to use this knowledge, a quest for Good Programming. I specially appreciate “The Perl Philosophy” as it manages to explain clearly the basic assumptions of Perl (and at the same time give a valid answer to the “write-only” accusations). Even if you have programmed Perl for a while, you’ll be surprised on how nice it is to see things clearly explained what you probably “kind-of” knew. chromatic’s inviting style helps a lot.
I pre-ordered the book on Amazon before it came out and I haven’t regretted it for a second. It lives next to my “Perl Best Practices” copy. I appreciate when content providers treat me with respect and not as a pirate (DRM!). That’s why I hope this publishing model is viable (open content, free pdf, free epub, companion site). I don’t mind voting with my wallet.