It really looks like I cannot stay doing nothing.
I grabbed the script I use to download my posts for the Everyday app and changed it a bit so I could download plenty of other people pictures.
416 to be precise.
I averaged all of them and this is the result:

average you
Cool, isn’t it? It’s a sort of daily ghost :þ
If you fancy to give it a try here is the script I used to fetch the images:
-
<?php
-
-
$numpages=10;
-
$maxresults=100;
-
$baselink="http://search.twitter.com/search.json";
-
$query="?q=@everydayapp&result_type=recent&rpp=$maxresults";
-
-
for ($i=0; $i<$numpages; $i++) {
-
-
foreach ($results->results as $kk=>$result) {
-
$hash=$matches[1];
-
-
if ($hash) {
-
$link=$xmlInfo->links->image_link;
-
-
$filename=$filename[3];
-
}
-
-
echo "P:$i R:$kk H:$hash\n";
-
}
-
$query=$results->next_page;
-
}
-
?>
and here is the console commands I used to calculate the average above and the standard deviation below:
-
convert samples/* -average average.jpg
-
for i in `ls samples`; do composite average.jpg samples/$i -compose difference diff/$i; done
-
for i in `ls diff`; do composite diff/$i diff/$i -compose multiply mult/$i; done
-
convert mult/* -average sd.jpg

standard deviation
The original SD image was quite dark so I normalised its histogram a bit with the GIMP.
You know those videos of people taking photographs of themselves everyday for a long time and than making a clip?
Well I’m doing the same with Everyday a nice iPhone application that allows to easily take the pictures and automatically makes the clip for you. It even twits your grunts if you want. And I do.
After a couple of days of that I decided that was just a pity to waste all those pictures posted on twitter, I fiddled a bit and wrote a quite simple app (this one) to browse through the photos taken so far.
Yesterday I published it, today I fixed the usual couples of bugs and now I’m presenting it to you :D
But, as you know I get easily bored so I decided to check how is my average me and here is the result.

Average me
The image is updated everyday around noon (GMT) with the new photos. You can add the reminders to your calendar if you are geek enough using this link:D
I just discovered that Homer J. Simpson has a time lapse video too.
Homer's time lapse
Lately I came across JSFiddle a nice sandboxing tool to play with JS, HTML and CSS.
The approach is very simple and intuitive. You have your page divided in four areas one for each part of your fiddle and the last for the result.

the interface
The interface offers handy keyboard shortcuts to speed up the development.
It supports plenty of frameworks as MooTools, jQuery and Processing as well as the possibility to test AJAX and import external resources.
You should definitely give it a try. It’s worthy and funny (at least if you find funny this kind of stuff :þ)
Today I spent a couple of hours playing with some of the most interesting capabilities of Mobile Safari.
Yes, I’m an iPhone owner and quite a fanboy too. I think that, at the moment, it’s the most advanced mobile platform on the market.
Anyway. I started documenting about the possibility to interrogate the accelerometer and the gyroscope from a webpage and I discovered that, not only it’s possible, but it’s also quite easy.
Basically the browser allow the code to bind two special events: the DeviceOrientationEvent and the DeviceMotionEvent. (Documentation here and here).
For my exercise I used the DeviceOrientation one. I read the gyro’s angles and use them to move the shadows of the boxes in the page.
It took me less than one hour to make it work and then I got bored. It’s just too easy.
So I decided to make it more “difficult” and decided to rotate the boxes accordingly to the gyro’s angles to give them a 3D appearance. I googled a bit and I found this article on 24ways. (BTW the website style is AMAZING! I really love the calendar part :)
Here is the result of two hours (hey, I had to work too while I was developing my toy :þ):
You can give it a try live here.
Brilliant, brilliant, brilliant blog about iconic characters depicted in only 16 pixels.
Here is Chewbacca:
For each of them there’s both a fullsize and 60x zoom view :D
4×4 Pixels [via Digital Tools]
It’s more than a year now since I started using GIT and I can say that is the best versioning system ever invented.
It’s fast, really fast. And clean. I used SVN at the univ and it was a bloody pain. Merging branches was awful and it easily got messed although it was just two of us working on the same project.
Now we are three from 6 different machines and everything is just a piece of cake.
You pull in the morning. Commit your changes every now and then. And push in the evening.
No fuss no pain.
Just nicely simple.
As I’m a console guy, I came up with a nice configuration for my bash prompt that tells me what’s going on with the project.
I thought it would be nice to share it with you. Here it is:
First add the following functions to your .bash_profile or .bashrc or, if you are a really clean guy, to your .bash_functions
-
function parse_git_branch_and_add_brackets {
-
branch=$(git branch –no-color 2> /dev/null | sed -e ‘/^[^*]/d’ -e ‘s/* \(.*\)/\1/’)
-
repo=$(git config –get "branch.$branch.remote" 2> /dev/null)
-
echo " ["$branch"@"$repo"]" | sed -e ‘/^\ \[@\]/d’
-
}
-
-
function parse_git_status {
-
status=$(echo `git status -s 2> /dev/null | awk ‘{print $1;}’ | sort | uniq -c | sed -e "s/??/U/g" | sed -E "s/([0-9]*)\ ([A-Z])/\1\2/"`)
-
status=$(echo "("$status")" | sed -e "/^()$/d")
-
-
ahead=$(git status 2> /dev/null | grep ahead | awk ‘{print $9;}’)
-
ahead=$(echo "{"$ahead"}" | sed "/^{}$/d")
-
-
echo -e "\033[01;32m"$status"\033[01;0m""\033[01;31m"$ahead"\033[01;0m"
-
}
Then edit your .bashrc (or .bash_profile depending on your distro) and find the line where the variable PS1 is defined. Once found, change it as follows:
-
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[00;34m\]\w\[\033[1;33m\]$(parse_git_branch_and_add_brackets)\[\033[0m\]$(parse_git_status) \$ ‘
If you are on a Mac (and I really hope for you that you are :þ) the line is the following:
-
PS1=‘\h:\W \u\[\033[1;33m\]$(parse_git_branch_and_add_brackets)\[\033[0m\]\[$(parse_git_status)\] \$ ‘
And that’s it.
Now your prompt should look as the following:
GIT powered BASH prompt
The part between square brackets are the branch and the repo. The part between the round brackets is the status of your working folder at the moment. The part between the curly brackets is how many commits you are ahead of the master branch.
In my case the branch is master and the repo is origin. I have one file added but not yet committed (A), one file untracked (U) and one file modified (M). And I’m one commit ahead of the master.
Useful, isn’t it?
[update]
There was a small bug in the parse_git_status function. I added a sort before the uniq so that it properly groups the changes.
[/update]
Something so geekly beautiful that will certainly (?) please you :D
The sound of sorting






































































