Author Archive

ReviewMe, Web

ReviewMe - WebHostingPal

Time ago a friend of mine talks to me about an advertising service: “ReviewMe”.
Once you signup, they look your blog and they propose to you to write about a service or a product or a site and in return they give to you a little amount of money.
I accepted to signup because ReviewMe allows you to write all you think about the product, not only good words!

Recently they ask to me to write about the site Web Hosting Pal.This site can help you to find the best web hosting for your requirements. Immediately I visited the website which I chose to promote and I thought what I can write.
Continue Reading »

News, Web

Today is Download Day

Set a Guinness World Record? YES WE CAN!
Download Day
Next World Record? Win browser war!

C, Source Code

How to use poEdit

In this guide I will explain how to simplify the localization process of a software written in c++ using “wxWidget (a cross platform toolkit), with poEdit.
poEdit offers to developers a conventient approach to localizazion, and there is no need to modify the source code by hand to modify translations, because they are all stored on a catalog file that is easy editable.

Logo poEdit

To prepare the source code to the localization, we must sorround all strings that we want to localize with the macro “_()”, for example:

...
wxMessageBox( _("localized string") );
...
wxMessageBox( wxT("not localized string") );

Continue Reading »

Linux

Automatically change upload limits in aMule

Every serious home-server should have aMule installed as daemon.
Unfortunately aMule, like all p2p programs, can slow down our connection, even if we aren’t downloading a thing or if we have few downloads remaining, because it use the upload bandwidth to share the downloaded files. We can lower the upload bandwidhth limit but if we lower it too much we will consequently download very slowly.

amule

Instead of continually, manually change the upload limit according to our needs, I use a little script that I wrote, that automatically set the bandwidth limits from the number of downloads in the queue. To use this script we must have the amulecmd utility installed (from source code or from distro packages).
Continue Reading »

MySQL, Source Code, Web, php

PHP backup of a mysql database

MySQLDump class is now at version 2.0 and this article contains obsolete informations about the version 1.0. For information about the new version check this article

I searched a way to do a daily backup of my wordpress blog in my home pc but I didn’t find nothing that completely satisfy me, so I decided to code it.
I separated the problem in two scripts:
The first, that is written in php and runs on the web server, makes the dump of mysql databases from my hosting provider and leaves the dump on the web server.
The other one (written in bash, and running locally) downloads the site and the mysql dump from the web server, via FTP. Unfortunately I discovered that my hosting provider (Aruba.it) didn’t supply with mysqldump its server.

Lamp

First of all, I searched for a php script that makes the direct dump of the database.

Continue Reading »

C, Source Code, Windows

Detect when an usb device is inserted or removed.

Normally the autorun in usb storage devices like pendrives is disabled for security reasons, so i wrote a little utility in c++ to launch a custom application in my pendrive when I insert it in a usb port.

Logo usb

Normally if you want to detect when a “hotplug” device has been inserted or removed from your system, you have to intercept the system message “WM_DEVICECHANGE” in “WndProc” function of the main window of your application.
Continue Reading »