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

mercoledì 17 ottobre 2012

reinstalled transmission-daemon on maxtor axis
it crashed as soon I web interface was accessed: i didn't remember
export EVENT_NOEPOLL=1

well, there was still a problem in visualization
Here (http://mybookworld.wikidot.com/forum/t-347160) the solution

the problem with the web page is that the css includes are enclosed in if statements that only allow them to be loaded in IE.
to fix:
- open /opt/share/transmission/web/index.html in your favourite editor (i use vim)
- about 13 lines down delete the following tags:

and since we're talking about transmission's web interface, for v. 2.61, I mention
https://trac.transmissionbt.com/attachment/ticket/4987/transmission-dlul.patch

mercoledì 10 ottobre 2012

$this->set(compact()) in cakephp too magic hurts

Just discovered that $this->set(compact()) in cakephp 1.3 has a strange behaviour.

a variable with an underscore in it will be available in the view as a camelized rewritten version of the variable...

my_var becomes myVar

too magic hurts!!!

snippet from
archive.robwilkerson.org/2008/12/28/cakephp-watch-out-for-the-compact-function/index.html
(available through google cache)

public function index() {
   …
   $vendor_type      = ‘Food’;
   $application_type = ‘Commercial’;
   $states           = $this->Vendor->Address->State->find ( 
      ‘list’, 
      array ( ‘order’ => ‘State.title’ ) 
   );

   $this->set ( compact ( ‘vendor_type’, ‘application_type’, ‘states’ ) );
   …
}
That’s a little better, but there’s a caveat.
Using this example, I went to my view code and tried to access my $vendor_type variable only to get an undefined variable error. After working my way through various debugging techniques, I pulled out the big gun. In my view, I dumped the output of PHP’s get_defined_vars() function and found that my $vendor_type variable had been renamed to $vendorType. I don’t know if the change was made by CakePHP or by PHP itself, but I didn’t expect it (nor do I have any reason to believe that I should have expected it) and the difference is as fatal to an application as it is obvious.

mercoledì 11 aprile 2012

Google vs Firefox


Ecco, giusto per documentare come una posizione dominante, come quella di san google che ti trova tutto, ti dà il cloud, lo storage, il calendario, la task list, la task force, la community, le mappe, picasa e pigarage, la terra, le tabelle eccetera eccetera eccetera (elevato alla eccetera)
possa
diventare
un soggetto
pericoloso.


Prima ti do i servizi,
poi ti do il browser
poi ti do il sistema operativo
poi te la prendi lì
perché le mie cose funzionano (sostanzialmente) con i miei strumenti

... e non è microzoz che parla!!!

gnome shell e synapse e vivere felici

Anche io son passato a gnome-shell. Nessun rimpianto rispetto a Unity!

Però servono alcune estensioni: indispensabile https://extensions.gnome.org/extension/105/panel-docklet/

Utile anche integrare google calendar nel calendario di gnome shell:
http://maketecheasier.com/integrate-google-calendar-into-gnome-shell/2011/10/04


E secondo me va *molto* meglio synapse  della ricerca in stile-unity o stile-lens (non so, non sono esperto): www.youtube.com/watch%3Fv%3Dw_WXR8iaZwo&ei=STiFT473LqbQ4QTlhd3HBw&usg=AFQjCNHcrKfMbvSWJ7a-ZIZJ9aqIRvWh_Q
Synapse si basa (purtroppo?) su zeitgeist

ecco come installare l'ultima versione:
sudo apt-get remove synapse
sudo add-apt-repository ppa:synapse-core/ppa
sudo apt-get update
sudo apt-get install synapse

domenica 12 febbraio 2012

Mssii maxtor axis

Per installare amule sul maxtor axis nslug2 con firmware modificato coyote

http://ipkg.nslu2-linux.org/feeds/optware/cs06q3armel/cross/unstable/amule_2.2.6-1_arm.ipk
(consigli qui)

(quello in cs08q1armel cerca glibc-3.4.9+, purtroppo...)

poi da utente non root seguire le istruzioni qui
per i file di config

export HOME=/opt/share/amule

amuled

ecceterauz (istruzioni anche qui)

venerdì 20 gennaio 2012

Siccome stiamo parlando di mangiare, e siccome abbiam preso l'imagimix (perché vojo bermi la centrifuga, non solo impastare, sminuzzare, tagliuzzare ecceterare), ho provato una ricetta un po' difficilina (per me) trovata su un blog bello da vedere.
Mi dicono i miei consumatori di fiducia che son venuti ottimi.

Cmq, giusto per dire, come si fa a dire che impasta bene una roba che non puoi neanche regolare la velocità??? mah

grub per dummies


ecco, con grub ci smanettavo, più o meno capivo, ma ora.... la luce!

http://jbakshi.50webs.com/Linux_tutorial/GRUB/GNU%20GRUB%20simplified.html

cioccolata calda

A far la cioccolata calda in casa, ho scoperto che facilmente si attacca al pentolino e dà un saporino perfettamente sgradevole.


Allora il secondo tentativo, ho letto in internet.
Tutto su internet.

Qui ho capito che per esempio val la pena di sciogliere la fecola di patate a parte, in acqua. E quindi aggiungerla al latte + cacao + cioccolata + zucchero che ha iniziato a bollire.
Gnam!