How to download your Facebook Look Back

Facebook added a nice feature on February 4, 2014 that shows a shot video of your best moments on Facebook since you joined the social network. That video is called the look back. You can see yours here: https://www.facebook.com/lookback

I enjoyed watching mine and was wondering how could I download that video or get an URL that I could share with my closest friends and family members. I was able to solve my problem looking into Facebook’s HTML source code. However, I imagined others would want to have their lookbacks too so I decided to create an easier solution for them.

Introducing the Download Facebook Look Back bookmarklet. Follow the next steps to get an URL for your look back:

  1. Drag that link to the bookmarks bar in your browser (View > Always Shows Bookmarks Bar to show the bar in Google Chrome).
  2. Go to your Facebook Look Back.
  3. Click the bookmarklet.
  4. Your browser should be redirected to the location of your Look Back video. The bookmarklet uses the HD url so, depending on your bandwidth, it may take a a few seconds or minutes before you see the video.
  5. To download your video use File > Save Page As.

If you are curious about what the bookmarklet does, here is the code:

(function() {
    containers = document.getElementsByClassName('swfObject');

    if (!containers || containers.length == 0) {
        return;
    }

    embeds = containers[0].getElementsByTagName('embed');

    if (!embeds || embeds.length == 0) {
        return;
    }

    flashvars = embeds[0].getAttribute('flashvars');
    url = decodeURIComponent(flashvars).replace(/.*?hd_src":"([^"]*)".*/, '$1');

    a = document.createElement('a');
    a.href = url.replace(new RegExp('\\/', 'g'), '/');

    document.location.href = decodeURIComponent(a.href);
})();

 

You can copy the code and paste it in Google Chrome’s Developer Tools Console or equivalent in other browsers.

How to debug plugin activation errors in WordPress

If you have ever developed a plugin for WordPress you may remember seeing one of those unhelpful messages saying your plugin generated N characters of unexpected output.

The problem with those messages, apart from not knowing what exactly is what your plugin generated, is that sometimes the errors are not easy to reproduce. You go to your Plugins section, deactivate the plugin in question, try to activate it again and now all you see is “Plugin activated”, no errors.

The last time that happened to me I decided I wanted to see the content of those errors every time they occurred, and I came up with a solution to achieve just that. Is not pretty, but it works. Basically, I stop WordPress execution when this errors occur and show the output in my screen:

Continue reading

Control MPlayer using the mouse only

MPlayer is the only player I use. MPlayer supports almost any format you may need; if you want to watch a movie or show episode it has simple ui that let you do exactly that and no more, so no distractions. If you want to work on more complex tasks involving audio or video MPlayer and MEncoder also offer powerful features that I prefer not to discuss but that I encourage you to read about them if you’re interested.

One thing that was bothering me is that when I was watching a movie and I was away from my computer I had to go near the laptop to do things like pause the video or change the volume level. I could avoid this using a wireless keyboard but I don’t want to buy one. However, I do own a wireless mouse and it would be great to be able to use it to control MPlayer. Continue reading

Como escuchar la W Radio y Radioacktiva en tu PC

La W Radio y Radioacktiva son dos emisoras Colombianas que se pueden escuchar a través de internet desde sus respectivos sitios web. Sin embargo, sería conveniente poder escucharlas utilizando un software reproductor de audio cualquiera, sin necesidad de cargar en el navegador el sitio web de la cadena radial. En este post encontraran las URL de los streams de audio para las emisoras y unas breves instrucciones para escucharlas en Linux, utilizando MPlayer. Continue reading

How to add a subpages menu to WordPress pages

WordPress allows the creation of nested pages. That’s a great feature when you need to split a rather long content into several parts and give them some structure. However, the problem is you’ll have to manually add links to the additional pages in order to make it easy for the user to navigate through all the content. Wouldn’t it be great if you could automatically add a menu, right inside the content of your pages, with links to the subpages or parent of current page? I think it would, and I’ll show you how… Continue reading