abidibo.net

Weblog

Glen Hansard, Milano 2013

glen hansard life me music

Dunque oggi sono scassato come una merda, ma sono contento perché ieri sera sono andato in una disco tamarra di Milano a sentire Glen Hansard in concerto.

Inizio concerto ore 20:00, ore 20:00 meno qualcosa parcheggiamo a poca distanza dal locale, 3 bottiglie di vino alle spalle, ci incamminiamo verso l'ingresso e santo Carlo "Oh, ma è Glen!", scorge Glen camminare verso di noi diretto probabilmente ad una birra e paninazzo.

Molliamo di brutto filtri e armamentari e lo placchiamo. Flu rotto in culo si fa firmare l'ukulele ora vero e proprio cimelio. Poi è il momento della foto ed inizio a blaterargli qualcosa di incomprensibile riguardo al fatto che anch'io avrei voluto fargli ...

read the full post


Development of a preview functionality with canvas

canvas javascript mootools

Do you remember the last post about canvas dealing with undo and redo functionality?

Now we'll see how to add a preview functionality, that is I want to see my straight line, or my circle, while keeping pressed the left mouse button and moving the pointer to change the shape size.

The first, bad, idea

Initially I thought that the way was to store the portion of canvas interested by the modification and restore it in the next mousemove call, so that the mousemove function has to respect the following flow:

  • restore the previous saved state
  • save the state of the portion of the canvas that now will be drawed
  • draw the new state

Such flow works, but doesn ...

read the full post


Deploy django application, set up another machine

deploy django git pip programming virtualenv

This entry is related to the series "Deploy django applications with nginx, uwsgi, virtualenv, south, git and fabric", the first part here.

So what happens here? Really nothing special, I've changed my working machine and so I had to set up my django projects on the new notebook. This post is only a remainder of the followed steps.

Install all the required system packages

Clearly I had to install some packages in the new machine:

  • mysql-server
  • python
  • python-dev
  • python-setuptools
  • build-essentials
  • libmysqlclient-dev
  • git

And also I've installed pip and virtualenv

Create the folder structure and the virtualenv

First of all create a directory which will contain the project, I've created it under /var/www:

$ mkdir /var/www/myproject ...

read the full post


A mootools powered showcase with dot pagination

animation effect javascript mootools programming showcase webmaster css3

Today I was playing (really working) with a nice animation effect to use for the pagination of a showcase module (or stories).

The concept is quite simple here, we have some items which iterates with a nice effect (fade in this case) automatically or not (decided through options). Every item has a dot controller which shows the item when clicked.

Nothing exceptional here, the cool thing is the effect that I gave to such dot controllers, as it seems that when clicking a not selected dot, the selected one moves forward or backward to reach the clicked point.

Quite difficult ...

read the full post


Using django-mptt TreeNodeChoiceField in a TabularInline admin form

django django-admin django-mptt

I use to use the django-mptt package to deal with tree like models. I also use to have my backoffice autogenerated by django admin.

Now one of the problems I've encountered was to add an inline form of a model which contains a "tree" field in a way the user can deal with a select input well formatted (showing parents and children in a clear way).

This task is easily reached in a normal form by defining the form ...

read the full post


Two must-have apps for android sysadmins

android mobile tips

This is only a short post to speak about two free awesome applications which I considered essential (especially the keyboard one) to perform sysadmin task from remote.

android

The terminal

I've tried a lot of them, and finally I decided to stay with Android Terminal Emulator, is fast and clean, and works well on my SGS.

The keyboard

Well, for those like me who can't edit text without vim the first problem to face when editing from mobile is ...

read the full post


moogallery, release 0.2

moogallery mootools programming webmaster javascript

Ok, the release 0.2 of moogallery is out!, Check out the updated demo here.

The new release offers some new interesting features:

  • Youtube and vimeo videos support
  • Audio support, mpeg and ogg encoding to assure cross browser capability
  • Mobile detection and swipe event handler to navigate through media in the lightbox view (requires Christoph Pojer's mootools-mobile plugin)

Maybe in the future I'll integrate a listener for the changes in the device orientation so that the gallery reloads recalculating the available dimensions. Such thing may be already done manually.

Check out the new release and comment here to let me know which improvements you'd add to the plugin.


Django, add properties to model instances

django programming tips

I've just discovered a great thing on django. Like in javascript, it is possible to add dynamically properties to a model instance, and use them inside a template. This is extremely useful in my opinion because saves us from creating a new dictionary mapping the object properties with the addition of the properties that we want to add.

Here a short example: I have a model WorkingPlace which is related to a model Case in the sense that every ...

read the full post


Welcome moogallery

javascript moogallery mootools

moogallery plugin has just been released and charged to the mootools forge. Actually the plugin was already available from ajs, the javascript "addon" library for mootools which I populate with scripts I often use in my work.

moogallery is a plugin for mootools that allows you to create a gallery of images in a table format with tips and lightbox included. It 's enough to provide the container which has to contain the gallery and the path to the thumb and the whole images with related information (title, description, credits) to generate an autosized gallery inside the container in which the thumbs are loaded sequentially. Each thumb has attached an over event (showing the image title) and a click event ...

read the full post


Protected members in mootools classes

javascript mootools programming

Some times ago I wrote about the private static and instance members in mootools classes. Now it's time to speak about the protected members in mootools classes.

So the goal here is to obtain some members which are inherited from the parent class and accessible to a child class but not outside.

The trick is to use the Object.merge function to merge together the private properties of the parent exposed to the children through a protected method and the private properties of the child. Look at the following code:

  1. var ids = 1;

  2. var myParentClass = (function(){

  3.   var _protected_prop = {};

  4.   return new Class({

  5.     initialize: function(id, par1, par2) {
  6.       this.id = id;
  7.       ...

read the full post


Your Smartwatch Loves Tasker!

Your Smartwatch Loves Tasker!

Now available for purchase!

Featured