It is not a good idea to use the root MySQL account to do backups. So, let’s create a user dedicated exclusively to doing backups. Log on to MySQL as root: mysql -u root -p Then create the new user
Batch scale images to a particular size
First install imagemagick: sudo apt-get install imagemagick Then CD into the directory containing the images and make a new directory that will hold all the re-sized images. In this case I called it resized: mkdir resized Then run the command
Upgrading to Apache 2.4 will prevent WebDAV listing of directories containing index files
I recently upgraded Apache from 2.2 to 2.4 and among all the expected changes that had to be made to the existing sites-available config files, I encountered an unexpected issue with the WebDAV sites. I could connect to the sites
Force all HTTP traffic to HTTPS
If you have SSL installed and configured on your site, there is a little need to continue serving http traffic over port 80. Performance is no longer a big issue and now Google would reward with better ranking sites that
Unable to create new directories or files (write access) in WebDAV with Apache2
It turns out that if you have enabled mod_rewrite on the server and you are actually doing any url re-writing for the site under which WebDAV is running, then you will not be able to create new directories or files
Block a range of IP addresses from reaching your server
When your Linux server gets bombarded with malicious requests the quickest and easiest thing is to block the offending IP address (or the entire range) using iptables: To block just one IP address: $ sudo iptables -A INPUT -s 103.10.86.53
In-app Billing API v3 throws IllegalStateException
If you have followed Google’s instructions when implementing version 3 of the Android’s in-app billing API by exploring their TrivialDrive sample app, you probably have come upon some numerous IllegalStateExceptions, like these: java.lang.IllegalStateException: Can’t start async operation (consume) because another
How to create an ftp user and allow write to the apache root directory with proper permissions
I do not recommend having a set up like this due to the multiple security vulnerabilities that it presents. There are much better and more secure ways to develop and deploy to a server. If you can use WebDAV, scp,
MapsInitializer.initialize no longer throws GooglePlayServicesNotAvailableException with the new google play services lib ver 15
I just updated the google play services lib to ver 15 to find out that MapsInitializer.initialize method no longer throws GooglePlayServicesNotAvailableException. In the description of this method it now says: Initializes the Google Maps Android API so that its classes
How to detect a user pan/touch/drag on Android Map v2
If you are impatient, you can skip directly to the solution. The new implementation of the Android Map (v2) is great in many ways and their support for map fragments is awesome, but they fall a bit short in a