How-to Guides
How to setup Docker container with legacy PHP 5.6 and Xdebug
PHP 5.6 is currently outdated and no more supported, but sometimes, in real World, you could be forced to setup and debug legacy projects that works with outdated technologies.
Split, reduce and convert PDF to JPEG using PHP ImageMagick
During these days I’m working on a PHP project based on manipulation of PDF files uploaded by users. Documents must be truncated, splitted to images, quality reducted, etc.
Quickly setup HTTPS on PHP Apache2 Docker container with self-signed SSL certificate
I often use local Docker images for development reasons, and sometimes, I need to implement features that only works in HTTPS environment: i.e. JWT Bearer token.
Continous deploying via FTP of Hugo-based Website with Github Actions
UPDATE 2020-05-01: Some weeks after this post was published, SamKirkland released version 3 of FTP-Deploy-Action. So I updated code snippets. Old version of this post is available on archive.is.
How to add Iubenda prior blocking of cookie scripts to Hugo Disqus shortcode
In recent days, I worked to convert my Wordpress-based personal website to a static blog created using Hugo framework. The result of this conversion is the blog you are reading at the moment. I made this decision because I was bored to continously update and take care of a complete Wordpress instance with the purpose of keep online a simple personal blog. But this is another story…
Building ZF3 composed pages using Nesting View Models and Forward Controller Plugin
Normally in ZF3 MVC projects, each controller action matches one view and use it to render its output.
Occasionally, we may want to build your ZF3 pages by dispatching various controllers from within the matched controller and merging outputs into a unique final view. In this way we can aggregate one or more views to create complex pages like report summaries or widget dashboards.
How to inject Zend Service Manager in ZF3 Controllers
Zend Service Manager component is Zend Framework’s implementation of service locator pattern. This object is very usefull component for an application and is largely used in ZF applications.
How to setup a Translate Controller Plugin in Zend Framework 3
Sometimes in our Zend Framework 3 multi-language application, we could need to access to Zend Translator component directly from Controllers. For example, when we have to translate a string to return in a JsonModel.
Print multiple files in Linux
The problem
Print many files in a single session is a common problem for people that works with big data set. Big documentation, Tax forms PDFs, lot’s of images or photos, are all data that are often stored in separated files. When you need to print them, you have to open each file with specific reader and click on print button.
Accedere ad una VPN Cisco da Ubuntu utilizzando un file PCF
La Virtual Private Network (VPN) è un ottimo modo per accedere alle risorse del tuo ufficio da casa o da qualsiasi altra rete in sicurezza e la VPN Cisco è una delle più efficienti e robuste.
Connect to Cisco VPN from Ubuntu using PCF file
Virtual Private Network (VPN) is a great option to access to your office resources from home in secure way and Cisco VPN is one of more efficient and robust type of VPN.
Modificare username WordPress utilizzando phpMyAdmin
Come sicuramente saprete, WordPress non permette agli utenti di cambiare la propria username dal pannello di amministrazione. Tuttavia, avendo accesso al database, è possibile agirare facilmente tale limitazione.
Delete history of on your own SparkleShare server
SparkleShare is a little Open Source software that allows users to share documents and files with version control and client side encryption system.
Change WordPress username using phpMyAdmin
As you surely know, WordPress doesn’t allow users to change their username from administration panel. But, if you have access to WordPress database, you can simply workaround this limitation.
Setup Oracle JDK 7 + Netbeans 7.0.1 on Ubuntu 12.04 LTS
In this post we will see how to setup a basic environment to develop Java applications on a Ubuntu Precise Pangolin. Normally this setup should be a very simple operation, anyway I had some trouble during process, so I decided to write down and describe all steps I followed to sort out.
Update Twitter Bootstrap to release 3 in Zend Framework 2
Recently I started a new project based on Zend Framework 2, using Twitter Bootstrap as CSS framework. Some days ago, new Bootstrap v3 was released and introduced a lot of changes and improvements. Because of ZF2 Skeleton Application comes out-of-box with Twitter Bootstap 2, I decided to setup the new project skeleton and update CSS framework to latest available release.
Fix Hibernation after swap partition resize
Hibernation can be an important feature for many users: it allows people to turn on the PC and get it in the exact state session of when it was turned off (open files, running applications, configurations edited, terminals, etc.).
Riattivare ibernazione dopo il ridimensionamento della partizione swap
L’ibernazione può essere un funzionalità importante per molti utenti: essa permette di spegnere il PC ed ottenere, alla riaccensione, la sessione nello stesso identico stato di quando è stata arrestata (file aperti, applicazioni caricate, configurazioni modificate, terminali, ecc.).
Resize multiple images using Linux
Resize an image is a simple operation: there are many software able to do that. The most obvious are Gimp or Photoshop. But what’s the right procedure to resize lots of images?
Ridimensionare un gran numero di immagini con Linux
Il problema
Ridimensionare un immagine è un’operazione semplice: esistono molti software in grado di farlo. I più conosciuti sono Gimp e Photoshop. Ma qual’è la giusta procedura per ridimensionare un gran numero di immagini?
PHP jobs with Gearman and Supervisor
The problem
Often in a PHP project there could be operations that need to be executed asynchronously. Some example are: processing mail queues, indexing data, computation that requires long elaboration time.
Processi PHP con Gearman e Supervisor
Problema
Spesso in un progetto PHP capita di dover eseguire operazioni in modo asincrono. Alcuni esempi sono: lavorazione di code email, indicizzazione di dati, calcoli che richiedono lunghi tempi di elaborazione.
Configurare filtri Doctrine 2 in Zend Framework 2
Scenario
Un filtro di Doctrine è uno strumento molto potente che può essere utilizzato per aggiungere condizioni a livello SQL all’interno del nostro gestore di oggetti Doctrine 2. Ciò significa che i filtri influenzeranno il comportamento di query DQL, collezioni, recupero dati, ecc.
Setup Doctrine 2 filters in Zend Framework 2
Scenario
Doctrine filter is a very powerfull tool that can be used to add conditional clauses at SQL level into our Doctrine 2 engine. This means that filters constraints will affect DQL queries, collections, lazy loading, etc.
Get latest LibreOffice in Ubuntu
LibreOffice is actually the most famous Open Source Office Suite. Unfortunately, Ubuntu repositories often doesn’t contains latest versions of it.
Creare e modificare documenti PDF con LibreOffice
Creare file PDF è un’operazione piuttosto comune. Modificarli, invece, è un po’ meno comune ma, comunque, una funzione molto richiesta.
Create and edit PDF documents with LibreOffice
Create PDF files is a very common operation. Modify them is a bit less common but, anyway, a very requested feature.
Come installare Funambol 10 su Debian Wheezy
In questo articolo vedremo come installare Funambol 10.0.3 su un server Debian Wheezy.
Innanzitutto, dobbiamo installare sul server il Java jdk:
How to install Funambol 10 on Debian Wheezy
In this post we will cover how to install Funambol 10.0.3 on Debian Wheezy server.
First of all, we need to install Java jdk on server:
ReCaptcha in Zend Framework 2 without Zend/Form
The problem
Captcha is a very useful mechanism to avoid automated abuse of your sites and applications. In particular,reCAPTCHA is a Google powered service that offers a free and simple way to implement a captcha protection field in your forms or pages. Zend Framework 2 implements his own components to handle captcha and a specific one to handle reCAPTCHA service. At the moment, the ZF2 documentation is very usefull if you want to integrate a reCAPTCHA in your Zend/Form component, but lacks in describing how to use reCAPTCHA service component alone. Actually Zend/Form is very powerful, but sometimes a developer need to use standard html to implement his own forms and this prevents to use ReCaptcha as Zend/Form element.
Working with DateTime in Doctrine 2 and Zend Framework 2
The problem
Storing datetimes can be a issue if servers and users of your application are distributed around the World and use different time zones. Each user want to work on datetimes in his specific time zone, servers automatically stores values in their time zone, etc. Storing data without operating right conversion will cause strange behaviours.
Switch to mobile, tablet, or other layout in Zend Framework 1.11
The problem
We want to implement a method to completely switch layout of our Zend Framework application without loosing flexibility. The solution must give us the possibility of switching all layouts and the views of the controllers we want.