From my blog:

  • Wed 10 September 2014
  • web

How to add a group choice combo box in a Django user profile form

Assume that you have a Django project where each user belongs to just one group, say Registered or Admin, but not both. You want to show a form in your front-end to let Admin users edit the user profiles, where each user profile is made with First name, Last name …

  • Wed 25 June 2014
  • web

PUT and DELETE HTTP requests with Django and jQuery

Discover how you can support PUT and DELETE HTTP requests in your Django project using jQuery. Add a REST touch to your project!

How to turn your Raspberry PI in a Google Cloud Print device

Google Cloud Print (GCP) is a quite useful Google service, allowing you to print in a GCP compliant printer from everywhere and from every device of yours, be it a desktop, a tablet or a smartphone. There are quote a lot of printers out there supporting GCP out of the …

How to reset mysql root password on Ubuntu 12.04

Fast and easy! $ sudo stop mysql $ sudo -umysql mysqld_safe --skip-grant-tables & $ mysql mysql> UPDATE mysql.user SET Password=PASSWORD('newpassword') WHERE User='root'; mysql> FLUSH PRIVILEGES; $ sudo kill `cat /var/run/mysqld/mysqld.pid` $ sudo start mysql Enjoy your new mysql root password!

  • Mon 31 March 2014
  • web

How to protect your Joomla instance from brute force attacks with Fail2ban

If you administer at least one Joomla instance you’ll be subject to brute force attacks before or after. Fail2ban is a very nice service written in Python which periodically scans your log files looking for signs of brute force attacks and perform some actions when an attack is discovered …

How to build a pretty Excel timesheet using Toggl API and Python

Since some months I’m using Toggl to track my work time, and I find it awesome! Toggl features a very powerful reporting system to have your timesheets filtered in many ways and exported in csv or pdf format, but I did not found the way to have an Excel …

Django on windows: how to make Django run in CherryPy as a Windows service

Recently a client asked me to investigate the possibility to have a Django application hosted in a Windows environment. I looked around a bit and there are many ways to achieve this goal. I found the “pure Python” approach described here simpler to deploy and configure, yet very powerful and …

  • Wed 22 June 2011
  • web

Any+Time: a great JQuery based date and time picker

Just found a JQuery based datetime picker. It’s great. Just add a Javascript like this: var format = "%d/%m/%Z %H:%i"; var picker_options = { format: format, firstDOW: 1, dayAbbreviations: ["dom", "lun", "mar", "mer", "gio", "ven", "sab"], monthAbbreviations: ["gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov …