Passa ai contenuti principali


Visualizzazione dei post da Novembre, 2012

4 html5 css frameworks

four interesting framework css designed for html5 and also for mobile. foundation 3 from twitter! very interesting ... (this is my favorite)
these frameworks includes tables, forms, tabs ... ie all those you need for a good ui. update: see also:

python pil and ubuntu 12.10

python PIL on ubuntu 12.10
install deps:
sudo apt-get install libfreetype6-dev libjpeg62-dev zlib1g-dev
ubuntu 12.10 uses stanges path for this library so, we make symlinks
for 32bit:
sudo ln -s /usr/lib/i386-linux-gnu/ /usr/lib
sudo ln -s /usr/lib/i386-linux-gnu/ /usr/lib
sudo ln -s /usr/lib/i386-linux-gnu/ /usr/lib
for 64bit:
sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib

enjoy :-)

python 2.4 and python 2.6 on ubuntu 12.10

For business reasons I am forced to use python 2.6 and python 2.4.
Compile the python on each  *buntu 12.10 machine that i have is a frustrating job. (some real, many virtual)
I made packages with checkinstall, these are not true ppa but maybe someone can find them useful.
I've also tested on Ubuntu 12.10 server and Lubuntu 12.10
First install the dependencies:

sudo apt-get install zlib1g libncurses5 libncursesw5 libc6 libbsd0 libreadline5 libreadline6 libsqlite3-0 bzip2 libgdbm3 libssl1.0.0

then download and install the packages:

sudo dpkg -i python2.6.deb
sudo dpkg -i python2.4.deb

(for now are hosted on dropbox doh!)

Everything is provided in the hope that it is useful to someone; but with no guarantee.
The paths are:

/opt/python-2.6.8/ (for python 2.6)
/opt/python-2.4.6/ (for python 2.4)

you can add to $PATH or make symlinks.

sudo ln -s /opt/python-2.4.6/bin/python2.4 /…


P.js, an object oriented javascript system in 559 bytes!
an example:

// P.js exposes the `P` variable
    var Animal = P(function(self)
        self.init = function(name)
   = name;
        self.move = function(meters)
            console.log( + " moved " + meters + "m.");

    var Snake = P(Animal, function(self, base)
        self.move = function()
  , 5);

    var Horse = P(Animal, function(self, base)
        self.move = function()
  , 45);

    var sam = Snake("Sammy the Python"),
        tom = Horse("Tommy the Palomino");


i love it!