Pretty annoying, exploding an empty string with – for example space – returns an array with one element, indexed with 0 and containing an empty string: $string = “”; explode(” “, $string); returns array( [0] => ” ) There is a simple workaround that also removes the unnecessary empty elements – array_filter(). This function removes […]
Author: icefront
Always ask before running this file
Whenever I download an .exe file from the internet and then try to launch this file, the annoying popup shows asking whether I want to run this file or cancel. Of course I want to run… There’s also a check box “Always ask before running this file”, of course checked… This feature was always annoying […]
Batch convert files to LZW TIFF
Ever wondered how to batch-convert your files to LZW-compressed TIFF files? Here is the easy solution… But why TIFF? Answer: Simple, due to compatibility. The image editing/viewer software which doesn’t read TIFF, doesn’t deserves attention… Also TIFF files hold the image data in a lossless way (unless JPEG). The LZW compression? The LZW stands for […]
Set up a FTP server (pure-ftpd-mysql)
There are multiple reasons I recommend using pure-ftpd-mysql as ftp service: can authenticate both physical and virtual (read from database) users. It’s highly but easily configurable. Installing: apt-get install pure-ftpd-mysql The configuration files are found at /etc/pure-ftpd. By default, pure-ftpd authenticates only users that has an uid 1000 or over. Thus root cannot authenticate (having […]
Monitor adjustment charts
For a quick check of the monitor’s correct brightness/contrast adjustment, here are some simple, downloadable charts. Why do you need to check the brightness/contrast adjustment of the monitor? When working with graphics you need to be able to view the very dark (5%) and the very light (95%) shades of colors or gray. Otherwise your […]
Return MySQL query as a single string
I was playing with some statistics and wanted to display some queries as a single, comma-delimited text. Why one may need this? Since the result of the queries can be concatenated in an endless ways by (eg. PHP) code… The answer: to have one-line query returning directly the string – eg. for statistical purposes only. […]
Stock photography
I’m living from stock photography. It’s about creating useful images for others, uploading these to so called internet-based ‘Agencies’ who make these online, make marketing for these and sell a license for these. I receive an amount of the selling price, from 15% to 50%, depending on the agency. Note that I don’t sell the […]
Useful Linux (Debian) commands and facts
This article explains some very basic linux commands an facts needed when setting up and working with a web server. Note that this article isn’t covering all about Debian, in fact covers a very few but important knowledge one may need. This article contains information mainly for beginners. Some useful facts under Linux, everything is […]
Set up a Samba server on Linux
With a Samba server installed and running on Linux, we can access partly or the whole system via LAN. Install Samba: apt-get install samba Follow the install wizard and enter “workgroup” or the group your network uses. The outside access can be configured for a special directory and for a special user or it’s possible […]
Set up a web development Linux server (Debian)
At first glance localhost seems to be a good solution for developing PHP web apps, but it has some drawbacks, as: switching between projects isn’t so easy for moderately complex websites, especially when working with databases, having fixed directory structure, etc.) it’s difficult to change the server (Apache) configuration it’s difficult to switch between projects […]