Skip navigation.

Log in | Sign up

photo of Cosimo Streppone

Random hacking

Assume nothing. Code defensively. Keep it simple, stupid!

Ubiquity for Opera, "currency converter" and more...

, , ,

Today I went back to a project that I really like, Ubiquity for Opera. Usually I do that when I'm annoyed by something (in this case I needed to quickly convert currency amounts), or when I find something funny.

This time, Ubiquity gets some more commands and some updates to existing ones.


  • the isdown command, that checks if a host is up, has been changed to be interactive. This is the first one that I managed to make interactive, as it requires a bit more magic than just opening a browser window.

  • the currency-converter command,
  • the instant-rimshot command


Download Ubiquity for Opera,
or go to the Ubiquity for Opera github repository.

Enjoy :-)

Improved slideshow in Dragonfruit

, , , ...

In the new Dragonfruit release, we also worked on an improved, or completely new, photo album slideshow functionality. This replaced our LightBox based slideshow that worked, but had some quirks here and there.

I think the new slideshow is really awesome, and if you didn't try it yet, you should try it now!.

Take a look at these albums:

by derspecht, http://my.opera.com/365/albums/slideshow/?album=704336

by AgnetaM, http://my.opera.com/365/albums/slideshow/?album=722249

And these are my own :-)

From the 365 group, http://my.opera.com/365/albums/slideshow/?album=769801

And one of my first photo albums on My Opera:

http://my.opera.com/cstrep/albums/slideshow/?album=504322

My Opera can now post on your Facebook wall

, , ,

With the new Dragonfruit My Opera release, out yesterday, now you can send your My Opera public blog posts to your Facebook wall! Read how to enable this feature.

Read more...

Opera 10 and the Microsoft Silverlight plugin

, , , ...

Just in case anyone is wondering...

If you don't know, SilverLight is the Microsoft answer to Flash.
If there's some website that has videos or other content that you want to see but they chose to use SilverLight, not all hope is lost.

Just go to the download page for the SilverLight plugin. If you are using Opera, it will tell you that "This browser is not supported blah blah blah...".

Ignore that bullshit and just download it. Then close Opera and install it.
Be sure to remove any pre-existing version first, or it won't work.

After the installation takes place, reopen Opera and go to the plugins page. You should see the SilverLight plugin already enabled. Congratulations, and welcome to the fantastic world of SilverLight content. :-|

YouTube is implementing OEmbed

, , , ...

That's good news. For once, we were faster than YouTube to implement something :-)
Anyway, if you look at any video page source code, you will find something like:

<link rel="alternate" type="application/json+oembed" href="http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3Da1Y73sPHKxw&format=json" title="Dramatic Chipmunk" />
<link rel="alternate" type="text/xml+oembed" href="http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3Da1Y73sPHKxw&format=xml" title="Dramatic Chipmunk" />


And, by looking at one of these URLs, for example the JSON one, you can see:

{
  "provider_url": "http://www.youtube.com/",
  "title": "Dramatic Chipmunk",
  "html": "<object width=\"384\" height=\"313\"><param name=\"movie\" value=\"http://www.youtube.com/v/a1Y73sPHKxw&fs=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/a1Y73sPHKxw&fs=1\" type=\"application/x-shockwave-flash\" width=\"384\" height=\"313\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed></object>",
  "author_name": "cregets",
  "height": 313,
  "width": 384,
  "version": "1.0",
  "author_url": "http://www.youtube.com/user/cregets",
  "provider_name": "YouTube",
  "type": "video"
}


So, from now on, you don't have to guess what's the HTML code to correctly embed a YouTube video (like we on My Opera did for the Embed Video button on the new blog post form, but you have the full, and always updated, HTML code in the OEmbed JSON content.

Nice, I think.

European Perl Conference, Day 1

, , ,

Every YAPC::EU (Yet Another Perl Conference Europe) is a really big event in the Perl world, with lots of people from every part of the planet. I got to know some of them already, so we just meet like good friends :-) This year's theme was Corporate Perl, how Perl is used in the corporate world.

This time though I was presenting a talk during the first day of the conference: How Opera uses Perl, that's up on Slideshare right now. If you take a look at it, you will find out that we actually use Perl for a lot of systems, from the very tiny to very complex, mission-critical ones. It's been quite some fun preparing the talk, and I think it also went decently.

There were lots of other interesting talks, even lightning talks, like Giuseppe Maxia's MySQL Sandbox, or Sue Spencer's talk about "Perl at Cisco Systems". There was also a talk on roles and inheritance in OO systems by Curtis Poe of the BBC, and a really funny lightning talk by Alex Kapranoff, a russian guy, but I don't remember the title. Merijn Brand presented lots of ways to improve your Perl modules. This guy's amazing. Also avid Opera user.

During lunch we met up with Martin Berends and Carl Mäsak and talked about Perl 6 syntax, CPAN 6, etc... really cool people.

CSS Frameworks

, , ,

The other day I was trying to make sense of all my feeds, that is, keeping up with the enormous amount of unread news, and I saw an article on IBM DeveloperWorks, "Weaving a better web page".

It's really interesting and I suggest you to read it. I've certainly heard about web frameworks, and javascript frameworks are not uncommon nowadays, but it was the first time that I saw mentioned "CSS frameworks".

Turns out this is a very useful concept. Abstracting away browser differences (Internet Explorer, anyone?), layout and typography are the main areas where these kind of frameworks shine. The one mentioned in the article is Blueprint, but there's tons of others, like yaml.

When I'll have time to redesign my personal page, I'm sure I will try out one of these tools...

LWP::Simple for Perl 6

, , , ...

During the last Perl 6 hackaton in Oslo, I got to meet in person some very cool folks from the Perl Community, and we had a lot of brainstorming fun, as usual.

I went there with the ambitious (and out of my skills, most probably) goal of implementing a Socket interface for Perl 6. Talking to the various smart folks there, I realized that we didn't need to write that much, because Parrot, on which the current Perl 6 implementation is based on, already had sockets support.

After much nagging, I wrote a quick & dirty wrapper that mimicked the existing Perl5's IO::Socket library, that Carl and Martin improved. And on top of that, we were able to write a really tiny LWP::Simple-like class for Perl 6.

Now it's on up on github, go fetch it!, before it's too late :smile:

International Space station tour (test youtube video embedding)

, , ,

This is amazing...

How I rebooted JSAN

Well... read on :-)

It seems that JSAN is finally coming back to life again, after some years of oblivion.

And the interesting thing is that I started it all!!!

I have proof. See this thread and who started it. :-)