Home » 2013 » August

Hook up your guitar to GarageBand on iPad with your Rocksmith Real Tone Cable

Do you own an iPad? Have you got GarageBand installed on it? And do you per change own the game Rocksmith (for PC, Xbox 360 or PlayStation 3) with the included Real Tone Cable? Yes? Good!

Now go get yourself a (cheap) USB adapter for your iPad so you can hook up your Real Tone Cable to it. These adapters can be bought cheap online from DealExtreme. Yes, you can use the official adapter by Apple which is of better quality but also a lot more expensive.

With your guitar connected to your iPad you can start recording with GarageBand. GarageBand also comes with a lot of guitar amplifiers and stomp boxes for added effects. Don’t quite like the result of your recording? Simply modify the amp settings or change the amp all together.

Using GarageBand with your guitar is a lot of fun as it opens up a lot of possibilities to try things out and just have fun. For one you can record a solo, duplicate the track and change some amp settings and et voilà you’ve got a double guitar solo going on!

I’ve been having a lot of fun with this for the past two weeks. I could also connect my acoustic guitar and even with the non-clean amp stacks it still sounded really nice. And with the Smart Guitar, Smart Bass and Drumkit you can quickly create a backing track to which you can jam on.

The Real Tone Cable has been in my possession since the Dutch/European release of Rocksmith and I only wished I had gotten this USB adapter for my iPad sooner.

How to catch and test sent e-mails in your app

A nice gem (literally, it’s a Ruby program) I stumbled upon yesterday is called MailCatcher. Using MailCatcher you can catch all the mail that’s being sent by the app you’re developing and (re)view their contents.

MailCatcher makes this possible by running (or rather being) a simple SMTP server. All you’ve got to do is direct your app to use the SMTP server provided by MailCatcher. Mail sent with this SMTP server stays inbound so you don’t have to worry a test mail is receiving by a customer.

It also provides a neat web interface in which you can review the mails that have been sent. Aside from viewing the contents of the mail you can also do further inspection on it by taking a deeper look into the source of the mail to view headers and such.

Screen shot 2011-06-23 at 11.39.03 PM(source: mailcatcher.me)

By using WebSockets the webinterface immediately updates when a mail has been sent. You can also download the e-mail to load it up in your e-mail client. This can be useful to review HTML based e-mails to see how they render.

If you’re using Vagrant I suggest you add the port the webinterface runs on to the forwarded ports list. Also run mailcatcher with --http-ip so you can reach the webinterface from the host OS.

Create a PDF document out of an HTML page

Perl has several modules on CPAN for creating and manipulating PDF files. Just a single search on PDF results in over 500 modules that have something to do with PDF files.

The most useful (or rather essential for PDF processing) are PDF::API2 and CAM::PDF. The former lends itself best for creating PDF’s and the latter for manipulating existing PDF’s and extracting data (such as plain text) from it.

Though these modules make handling PDF’s easier, handling PDF’s still isn’t much fun. As I was in need of a way to generate PDF’s out of work orders (or job tickets) and not feeling much for creating the layout manually and properly formatting paragraphs (manually) with PDF::API2 I started to look further.

I ended up trying out PDF::FromHTML. With PDF::FromHTML you can create a simple HTML layout and let the module create a PDF out of it. You can do some basic configuration such as changing fonts and font-size (check out its documentation for more). It also provides a nifty command line tool called html2pdf.pl for converting an HTML page to a PDF.

The resulting PDF’s from PDF::FromHTML weren’t as pretty as I had wanted, but good enough for the problem I needed solving. But after I started using these work order PDF’s in practice I found I needed more formatting freedom when writing the problem description. So I decided to add Markdown support through Text::Markdown.

Using Markdown I had added a list of tasks to a work order with the items being in bold text and the descriptions underneath it in normal text. Sadly the PDF’s created by PDF::FromHTML didn’t cope very well with nested HTML-elements. A bold paragraph would somehow cause the next paragraph become bold as well. I think that’s a bug in PDF::FromHTML and I’m sure it can be fixed and shame on me for not looking into it.

So instead of seeing if I could fix the bug I did a quick search on the internet and stumbled upon xhtml2pdf, which is provided by python-pisa/xhtml2pdf. Pisa is a Python library for converting HTML pages to PDF’s. It’s far more sophisticated than PDF::FromHTML as it supports more (all?) HTML tags and even CSS2 (plus some CSS3 stuff) for styling.

Currently my webapp will be using xhtml2pdf if it’s available or either fall back to PDF::FromHTML.

Some other interesting Perl PDF modules worth looking into some day are PDF::Boxer and PDF::TextBlock. And while writing this post I also found out that PhantomJS, a headless WebKit, also has a way of saving a page to PDF. So even though handling PDF’s still isn’t a lot of fun, with all these modules and software available it has become a lot easier.

Want to use a web service to convert HTML to PDF? Then take a look at HTML2PDF Web Service.

Setting up WiFi on your Nintendo Wii U

Late June this year I got myself a Nintendo Wii U. After all these years it’s still exciting to unpack a new console. I decided to get a Wii U because Microsoft and Sony disappointed me with their new consoles and games and because I was ready for something new and for Nintendo. Having skipped the Wii and not having played much with the GameCube it was long overdue to give Nintendo another chance.

So far I’m loving the Wii U. New Super Mario Bros. U is an awesome game. Zombi U is a great game as well, but it’s too scary for me. I’m not a fan of zombies and especially not scary zombies. I’ve ordered Pikmin 3 as well and later this year a lot more exciting new games are coming to the Wii U. Can’t really say that about the Xbox 360, PlayStation 3 or the next generation Xbox and PlayStation.

One thing I’m loving less about the Wii U is the confusing WiFi setup. The Wii U can store several WiFi connecting settings. Depending on the security type of your WiFi network you can either use the connection for both Wii U and Wii games, or Wii U only. The Wii U interface is very confusing on this part and it took me a while to realize that not having a Wii compatible WiFi connection is fine for the Wii U and Wii U games itself. Which is good, because I wasn’t feeling anything for easing up my WiFi security.

After you figure that out the most annoying thing occurs: DHCP doesn’t work. Nintendo thinks it does, but it doesn’t. If you set it to DHCP it tries to connect and after a while it reports the access point can’t be found.

The solution is simple though. Instead of using DHCP you’ve got to set your connection settings manually. Just enter a static IP-addres, subnet mask and gateway (use ipconfig/ifconfig to figure out your IP-range, subnet mask and gateway). For DNS you can use Google’s servers: and A more comprehensive guide on setting up your connection manually can be found at Kotaku.

I really like the Nintendo Wii U, but I simply can’t understand why DHCP WiFi doesn’t work. Setting up your network on your PlayStation 2 or GameCube wasn’t as painful as this is. Aside from this flaw I still think the Wii U is awesome and if you’re a gamer you should probably get one.