Caffeine, silicon and nimesulide

{ 'fullname' : "Michele Zonca", 'tags' : ['developer', 'mashaper', 'caffeinated', 'nerd']}

I really like to write down my ideas of apps/services that I know I will never do.

Or at least that I’m not able to do it right now.

Today I opened that file just to take a look at what I’ve wrote there in the last year and I found some ideas I even forgot. For one of these ideas I wrote a cryptic description that I can’t even tell what it means :)

We’ll se if I’ll be able to throw some weekends at them and implement a couple of small projects!

Mixed emotions from splinder

I’ve just saved my first blog from the soon-to-be-closed blogging platform splinder.com. And I read each post.

I started blogging in 2003. I was in my nerdiest period ever and that one was my non-tech blog.. I also had a alternative nickname for it :)

Mixed emotions in reading stuff from 8 to 5 years ago.

Trust

root@erakis:~# apt-get update && yes | apt-get dist-upgrade

Should I put it in my crontab? What can go wrong..

:)

Chromium Browsing History in Debian

I really don’t like the way Chrome/Chromium handles browsing history: if you search entries you cannot edit (delete) them.

This sucks especially when you have an hostname (in my case it is ‘orion’, my desktop PC in Italy) you used to access some months ago. And every time it simply pops up when writing an url and (as far as i know) you cannot easily delete it from the frontend.

Ok, I could look for an extension to better handle browsing history, but It would not be funny..

close every chrome/chromium instance

michele@erakis:~$ cd .config/chromium/Default
michele@erakis:~/.config/chromium/Default$ sqlite3 History
sqlite> .tables
[..]
sqlite> delete from urls where url like ‘%orion%’;
sqlite>.quit

sqlite is everywhere!

Weather in London?

I’m leaving in minutes and going to London, for a couple of meetings and tomorrow’s PHP meetup.

So, I do not have much time, but I would like to take a look to forecasts in London.

I could browse to some websites, sure..but I’m a nerd and if something doesn’t involve coding it’s not fun and, moreover, Mashape has a beatutiful Weather API! :)

So:

  • go to that API url http://www.mashape.com/component/Weather
  • download PHP client library (or ruby, or python, or java, or objective-c or use it in json.. as you prefer.. I’m going to a PHP meetup, so I will use PHP!)
  • unzip it in a directory of your choice
  • enter the path where you unzipped it (you will see a Weather.php)
  • open your favourite text editor
  • this is the code I’ve written:

<?php
include “Weather.php”;
 
$w = new Weather(your-mashape-api-key);
$result = $w->getForecasts(“london”)->result;
foreach($result as $day) {
       print $day->day_of_week.”: “.$day->condition.”\n”;
}
 ?>

Obviously, you have to put your Mashape API Key.. you will find it in the “account settings” section.

I’ve saved this file as client.php.. so I’m ready:

michele@erakis:~/Downloads/mashape-Weather-v1$ php client.php

Wed: Chance of Rain
Thu: Chance of Rain
Fri: Clear
Sat: Chance of Rain

Sh*t.. where is my umbrella?

Screencasting @ Mashape

We are working hard in Mashape to allow, as soon as possible, more alpha users to play with our platform. One of our main focuses is the documentation.

Yeah, it could sound weird, but we need really good documentation. And it’s really hard to write it down. Harder than code.

But, one of the main bonus, of creating documentation vs writing source code, is that you can use different tools and create it in different formats. For example screencasts.

I’m just trying recordmydesktop to record screencasts:

michele@erakis:~$ recordmydesktop —no-sound  —v_quality=50

The output is a file called out.ogv. Then I’ve encoded it using ffmpeg (video codec mpeg4 and avi container) just to upload it on Vimeo

michele@erakis:~$ ffmpeg -i out1.ogv -f avi -vcodec mpeg4 -an -b 2742k video.avi

Yes, I love the command line..

My dual screen configuration

Today i’m working at home.. so i’ve plugged to my laptop the monitor from another pc.

Sometimes i use the external monitor when i manage to work full day at home, but today i found a pretty good configuration (using NVidia control panel):

left: Monitor 17” LCD, 1280x1024, primary
right: Laptop’s monitor, 1280x800

Making primary the external monitor makes gnome display there gnome panels with menus and everything else (workspace switcher, clock, notification area ..). So in the left monitor i have everyting: from browser to pidgin, rhythmbox and gnome menus, in the right monitor i have eclipse fullscreen and nothing else..