Passa ai contenuti principali

Post

Visualizzazione dei post da Novembre, 2012

4 html5 css frameworks

four interesting framework css designed for html5 and also for mobile.

http://foundation.zurb.com foundation 3http://twitter.github.com/bootstrap/ from twitter!http://gumbyframework.com very interesting ...http://csshor.us (this is my favorite)
these frameworks includes tables, forms, tabs ... ie all those you need for a good ui. update: see also: http://imperavi.com/kube/

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/libjpeg.so /usr/lib
sudo ln -s /usr/lib/i386-linux-gnu/libfreetype.so /usr/lib
sudo ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib
for 64bit:
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /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!)

https://dl.dropbox.com/s/0cvh8jm7qcbq5py/python2.4.deb
https://dl.dropbox.com/s/jbdgbt2smu352ry/python2.6.deb

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

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

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

    var Snake = P(Animal, function(self, base)
    {
        self.move = function()
        {
            console.log("Slithering...");
            base.move.call(self, 5);
        };
    });

    var Horse = P(Animal, function(self, base)
    {
        self.move = function()
        {
            console.log("Galloping...");
            base.move.call(self, 45);
        };
    });

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

    sam.move()
    tom.move()
})();

i love it!