domenica 30 dicembre 2012

raspberry pi in qemu under ubuntu 12.10

The new raspberry has arrived! But I don't have neither a TV: We all have better choices nor a monitor: We alle have notebooks here (nor a free sd card, ehm ehm)!
So I have to wait for the next trip to parent's home.
I definitely will need to use raspberry pi using vnc over ssh, as per this adafruit receipt. 
In the meantime I tried to boot the raspberry image in an emulator, just to see how the raspi-config menu looks like (I need to enable ssh at startup: adafruit helps again).

First: download the kernel
wget http://xecdesign.com/downloads/linux-qemu/kernel-qemu

Second launch qemu this way
qemu-system-arm -M versatilepb -cpu arm1136 -hda 2012-12-16-wheezy-raspbian.img -kernel kernel-qemu -m 192 -append "root=/dev/sda2"

Btw useful link: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=11713&p=139992

lunedì 10 dicembre 2012

leaflet.js on click of control checkboxes

To have leaflet.js control do anything by clicking the control input checkbox, I did this way, to bypass to the singular structure of DOM (may label tags, inside the checkbox):

$('.leaflet-control-layers-overlays > label').on('click', function () {
                $('.leaflet-control-layers-overlays > label').each(function(i) {
                     if ($(this).find('input:checkbox').is(':checked') ){
                         $('div#div_legenda' + i).fadeIn('slow');
                     }else{
                             $('div#div_legenda' + i).fadeOut('slow');
                     }
                });
                   
             });

downloadosmtiles.pl cant find Tiles.pm

Just trying to download from openstreetmap. But seems like if my IP has been banned.

Just a note:
In case the following error occurs, copy downloadosmtiles.pl 
into the lib directory: Can't locate Geo/OSM/Tiles.pm in @INC

lunedì 3 dicembre 2012

Open-Sankoré made portable

Open-Sankoré is becoming very interesting as a software to manage LIM.
My colleague just said goodbye to overbloated, buggy and not well supported (as well as - last but not least! - proprietary) Smartboard of Smarttech technology.
Well, he needed to make open-sankoré portable and I did it, although I don't love to help to use software a proprietary OS like Winzoz. Hey, there is a Linux version!
Since I have not found any info about the process, it can be nice to share the way I did it.
Open-Sankore 2.0 (as the previous version indeed) seems very easy to make portable, as it does not write in obscure in the registry.
So are you in a hurry and want to know how:
1. download PAL from here unzip it in - say - c:\programs\PAL
2. install open-sankore (say in c:\programs\open-sankore)
3. copy the directory containing open-sankore inside the directory containing PAL and name it sankore
4. edit PAL.ini file so that it looks like this:
[PALOptions]
Executable=".\sankore\Open-Sankore.exe"
RegistryPath="HKLM\Software\Open-Sankore"
FilesPath="%userprofile%\Documenti\Immagini\Sankore"

I also set the FilesPath option to my Document folder. There are subdir named Sankore in "%userprofile%\Documenti\Video\Sankore" and in "%userprofile%\Documenti\Music\Sankore". The names of the directories, as you may have noticed, are internationalized (btw: damn to internationalization and char-encoding, but it is another story to tell, involving python and php).

That's all, or should be.
Enjoy