Pedro Assunção

Archive for the ‘experiments’ Category

Red Hot Chili Peppers lyrics generator

Here’s a little something i tried yesterday: a ruby script that mixes and matches verbs, nouns, adjectives, and colors to come up with crazy ass lyrics, red hot style. Enjoy $nouns = IO.readlines(‘names.txt’) $adjectives = IO.readlines(‘adjectives.txt’) $verbs = IO.readlines(‘verbs.txt’) $adjectives << ['red','blue','green','white','black','yellow','brown','gray'] $pronouns = IO.readlines(‘pronouns.txt’) $adverbs = IO.readlines(‘adverbs.txt’) $prepositions = IO.readlines(‘prepositions.txt’) def get_rand(collection) sleep rand [...]

Full list of Coca Cola brands – had no idea there were so many

As a part of my Ruby learning process, i decided to write something to retrieve the full list of brands that Coca Cola currently owns from their website. The list is split across multiple pages, but with some Ruby magic and a nice library called Hpricot to traverse the HTML it was 5 minutes of [...]

Dropbox plus Mercurial -driven development. Anyone tried that?

One of the biggest pains of any developer is maintaing the source code. Especially if you – like me – have a gazillion pet projects that need to be updated whenever you come up with “cool idea #20000″ for one of them. Version control systems like Mercurial are awesome, but they are only part of [...]

Java Web Start (jnlp) simple example

One of my current projects requires me to deliver a Swing application via Java Web Start. This meant some research to figure out how that works. Since i’m a nice guy, here’s the result for everyone that needs it. As you can see – in the folder structure image – there are some files that [...]

Did a Russian scientist just invent an anti-aging pill?

He seems to be a very respected scientist in his field, with a lot of publications and a job at a very prestigious university. Even Gunter Blobel, a biochemist and Nobel laureate seems to respect him quite a bit. Is it just a couple of years until we are able to remain young and healthy [...]

Trying out the android app

So I come back from the road trip and what’s they’d first thing I do? Install the wordpress android app so I can blog anywhere, hehe. I kind of decided to use my blog as it was intended (as a web log), not necessarily as people see them these days (as places to write longer [...]

A new kind of bandages?

I hate bandages. I really do. Everyone knows the best way for a wound to heal is to leave it exposed to oxygen and, hence, a bandage is the worst thing you can do to it. A couple of days ago i took a big crash while going downhill on my bike (for gore lovers, [...]

My blog in the old geocities age

I recently came across this devilish we application that turns any website into a version that could have been hosted on geocities a long, long time ago. … I just laughed my @ss off looking at the “Bill Gates is the devil” image on the right :D

Sproutcore on OSX snow leopard

It recently came to my attention the existence of this heavily-client-based web framework to develop desktop-like applications called Sproutcore and is backed up by Apple (there is another cool alternative called Capuccino). Basically it relies on Javascript to create nice desktop-like applications, but on the web. Ever since i heard about node.js i have been [...]

iPad jailbroken one day after coming out. That was fast.

“A well-known hacker of the iPhone, who previously defeated Apple’s restrictions on developers, has claimed in a video to have hacked the iPad. Just a day after release, the hacker, who goes by ‘MuscleNerd’ online, said that he has gained root access to the iPad…”, as seen on slashdot.

Super regeneration, here we go

A new study has found that a specific gene (P21) is directly linked to regenerative properties that you typically find in reptilian creatures, such as salamanders. Apparently, when deactivated, this gene allows mice cells to behave more like stem cells and fully regenerate wounds without leaving any scars. Are we close to super fast regeneration, [...]

Video speed controls on youtube’s HTML5 player

I don’t know if you noticed, but youtube introduced speed controls to their HTML5 video player. I have no idea if it was there from the beginning, actually, but it’s a really cool feature indeed

Bomb This Country

After an awesome Japanese dinner with my good friend Luizzz , we came to the conclusion that the website that was missing was one where you could bomb any country in the world. … So over the course of about 8 hours – the next day – we came up with bombthiscountry.com , a meaningless website where you can bomb any country in the world (yes, China, Tibet is a country).

Websockets tutorial/example with pywebsocket

As everyone already knows, Google Chrome now supports websockets. In essence, this allows you to keep a connection open with a webserver indefinitely (analogous to typical sockets) and send data bi-directionally. Unfortunately Chrome is the only browser currently supporting this, but I’m pretty sure this will change. So I decided to give this a try [...]