rui lopes notebook

From zero to a blank world map

When you need to show a web map you normally end up using something like:

var map = L.map('map').setView([38.736946, -9.142685], 3);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map);

But what does it take to show that map? What software stack lays behind the curtains? And how can you customize the map? Lets find out!

We start from a vanilla Linux Virtual Machine and end up showing a humble web map – a blank world – the hello world of maps.

continue reading »

Taking web application screenshots with CasperJS

When you need to take screenshots of a web application, the normal route is to navigate to a page, fill in the forms with sample data, use the Print screen (or Alt+Print screen) key to take the screenshot, then crop and export it with a normal application like GIMP… which is quite time consuming… and god forbid if you need to do it again, with a slightly different data or page design…

A better route would be to automate the whole process. Let me show you how to do it with CasperJS!

continue reading »

Fix magnet link openning in Xfce / Arch Linux

The current Xfce (4.10) that ships with Arch Linux has an annoying bug of not correctly opening Magnet URIs (e.g. when you click a magnet link from within Chromium). So I had to have that fixed, but doing it took longer that I expected… so I’m creating this recipe for helping you solving the problem more easily.

continue reading »

Hello World

Hello World! How’s that for a start? Its one of those (rare) things I like about developers tradition, in this case, the English language version. This should give you an hint about one of my facets.

Oh, this is my first blog ever, so please bear with me while I push my inner self to write. In the mean time, you can follow me on twitter.

– RGL

continue reading »