HOWTO let it snow in <canvas>

I’ve been experimenting a bit with the <canvas> tag. And hey, what’s a better way to use it right now than to make a browser screen full of snow? It even works in Internet Explorer (using excanvas) although pretty slow. For best results view in your favorite non-crappy standards compliant browser.

View a demo here. And if you want to tinker with it, download the sources from Google Code (open source under the MIT/X11 license).

Want to learn more about the <canvas> tag? Try this tutorial from diveintohtml5.org or the one from Mozilla.

Merry christmas!

Rotate buttons don’t work in WordPress 2.9

Wondering why those cool ‘image rotate’ buttons you’ve seen in the WordPress 2.9 video aren’t working on your installation? They apparently depend on a PHP function which isn’t very widely available, and hence, they don’t show up.

I’ve created a ticket for this bug in WP’s bug filing system, so go there and vote for it so the developers can fix it in 2.9.1!

The Twol: now available as a terminal (cli) command

cli

I wrote a little shell script that enables you to query The Twol (you know, my little pet project that provides instant information on lots of things) from the terminal (command line interface).

So, now you can do stuff like:

» Translate sentences from English to German (and many other languages)
twol translate en de I would really like a nice cold beer

» Get the weather for virtually any city in the world
twol weather St. Petersburg, Russia

» Check if a Twitter username is still free
twol twitterusernamefree stevejobs

Right from the command line (under Mac OS X and Linux at least :)

You need PHP to run the script. In Mac OS X that’s included out of the box, under Linux you might need to install php5-cli or another package with a similiar name.

Then you can simply:

  • download the script
  • copy it somewhere in your $PATH
    cp twol /usr/local/bin
  • make it executable
    chmod u+x /user/local/bin/twol
  • have fun!

Photo credit: *n3wjack (CC-BY-SA)

Music

I’ve made some music over the years. Here you can listen to some of my tunes. Note all this music falls under a free license, so please feel free to download stuff, share it with your friends, remix it, etc, as long as keep the terms of the license in mind.

Read the rest of this entry »

Backup your tweets with BackupTweets

logo

Twitter is a typical example of a cloud service. Unfortunately, having all your tweets in the cloud instead of on your hard drive has a large drawback: things can go wrong. A few days ago T-mobile subscribers lost all of their data because of a large server outage at Danger, a Microsoft subsidiary. Something like that could happen at Twitter too, meaning that all of your beloved pieces of 140-character poetry are gone.

Furthermore, Twitter has an artificial limit in place that limits you to viewing your last 3,200 tweets. I’m an avid user of Twitter myself, and seeing my number of tweets rapidly reaching to the 3,200 limit i set out to do something about it and backup my tweets.

There are several solutions for doing this. But many of these didn’t fit my needs. Most of them require you to enter your username/password, which isn’t a very cool thing or are a bit clunky in their user interface.

So, i wrote something myself called BackupTweets. It’s completely open source (GPL-licensed), so you can download the whole package and run it from your own web server. The only thing you need is a web server running PHP.

You simply enter your username/password and press ‘GO’. The application will fetch all of your tweets in their original format (straight from the API) and save them as a big JSON file (for archiving and later processing), but also as a handy HTML file.

If you’re comfortable with entering your username/pass you can check out the demo. If you’re not you can download the whole package as a zip or check out the source code directly from Google Code.

Introducing…The Twol

twol

Read this announcement in Dutch.

I’d like to introduce you to a little project i’ve been working on for the past time. It’s called The Twol and it’s a new way to get all kinds of instant information using a command-line like interface on the web or using Twitter.

How does it work? The Twol works by entering simple commands, either using the interface on the website or by sending tweets to @twol on Twitter. Take a look at the screenshot here below for an example:

twolexample

Currently there are around 20 commands, that you can use to..

If you speak Dutch you might also enjoy some commands from my art site, 365 DAGEN HAY, including dooddoeners, onbegrijpelijke moppen, de Nimweegs vertaler and of course the Wilders citaten generator.

You might ask how this differs from some of the functions from Google. Well, Google always returns search results, which might not be the thing you’re looking for when searching for the current weather in Rome. Furthermore, there are many other commands that might not be the first result on Google. Of course Google search results don’t integrate in Twitter.

In that sense, The Twol is more like the classic command line or an IRC bot, with the difference that you don’t need to leave your browser or Twitter client to get quick information.

Note that when using Twitter, it can take up to 20 seconds to get a reply back. This is a result of the way Twitter works, unfortunately i can’t do anything about that. If it does longer than 20 seconds though, The Twol might be broken. Please let me know so i can fix things :) Of course, the website works instantly.

Of course, this is all still very much in beta so i’d like you to test the Twol and give feedback and what works, what doesn’t work, and what commands you’d like to see added (if you’re a little technical, you might be able to write your own commands in the future). Right now you can already hack a little bit using The Twol’s API.

You can give feedback using the comment form here below, by mailing me or of course by using The Twol itself.

Have fun!

Reaction 1.0 released

reaction

My niece needed a piece of simple software to measure reaction times for a school research project. Apparently, it isn’t that simple to find a simple tool to accomplish that, so i made something in an afternoon that runs in a browser she could use.

The reaction test goes like this: after clicking ’start the test’ ten random items appear, either a small image or a sound. You then need to press the spacebar as fast as you can. After the test is over a scorecard appears with your reaction times in miliseconds.

The application should work in Firefox, Opera, Safari and Chrome. I haven’t tested it in some other browsers (*cough* Internet Explorer), so if it doesn’t work try Firefox.

Try a demo, get the code here as a zip or check out directly from Subversion.

» An overview of all articles can be found in the archive.

Hi! I'm Hay. I make art, do projects and blog here. Read more »

Projects

More Hay at...

Archives by month