Davide Muzzarelli

Dynamic pure SQL WHERE clauses and optional JOINs

How to create queries with powerful dynamic filters using only pure SQL.

How to use Go and FastCGI

pubblicato it 03.09.2013 in # in english, * livello avanzato, golang, script completi

FastCGI is a good solution for using Go in a shared hosting like Dreamhost http://wiki.dreamhost.com/FastCGI or also in a VPS. This post is about how to write a Go program in FCGI mode and deploy it on Apache.

Two template filters for Django

I want to signal two new template filters for Django. Precise truncate words by chars It truncates the text when it exceeds a certain number of characters and deletes the last word. Adds ‘…’ at the end of the text, only if truncated. The difference between other similar filters is that this deletes the last [...]

New Smarty plugin for highlighting PHP code

pubblicato it 21.02.2011 in # in english, * livello intermedio, PHP, script completi

I want to signal a new plugin for highlighting PHP code. I wrote this modifier for Smarty, a template engine for PHP that I am using for a long time. The plugin can be downloaded from here. The license is the New BSD. The usage is very simple: {$php_code|highlight}

Apache mod_rewrite and directories protected by password

As a web site developer, when I use a server side script (like a FCGI, PHP, ASP ecc.) I activate the mod_rewrite in order to convert the urls in a pretty format. So, an url like this: http://www.foobar.it/index.php?page=articles …could be converted like this: http://www.foobar.it/articles/ This is very good for SEO and just for the simplicity [...]

Python client for the Nirvanix API

pubblicato it 29.07.2008 in # in english, * livello avanzato, python

I released a Python client for Nirvanix. The project page is: https://www.hosted-projects.com/trac/Design/pub/wiki/Nirvanapi It include the most important API calls, is light (one file and less of 400 lines of code) and have not dependences. The client support right now the following API calls: LoginLogoutCreateFoldersDeleteFoldersDeleteFilesCopyFilesCopyFoldersMoveFilesMoveFoldersRenameFileRenameFolderSideuploadListFolderCreateHostedItemExtractFrames The login is automatic also when the connection drop. List a [...]

GTD in a text file, the Muzzarelli’s version – part 3

pubblicato it 23.01.2008 in # in english, * livello base, GTD, organizzazione

The first and the second parts are available here and here. For dates I’m sticking with Paul Allen‘s recommendation: appointments and milestones goes in your agenda, the things to do that starting at a certain date goes in your tickler file or in your electronic agenda. For the items, in order to remember certain dates, [...]