Category: Informational

Why are PHP’s function names a mess?

I have always wondered this, its exceptionally hit and miss and there isnt any real standards. I recently found the reason on the internet Well, there were other factors in play there. htmlspecialchars was a very early function. Back when PHP had less than 100 functions and the function hashing mechanism was strlen(). In order to

Add a user to a group in Linux

How to add a user to a group in Linux usermod -a -G Its a simple as that. So for me adding the user “chewett” to the user “vboxusers” i run the command usermod -a -G vboxusers chewett The -a flag means that the new group is appended, without it you will overwrite your current

Location of GeoIP.dat for PHP

To find the location of GeoIP for PHP you can ssh into the server and use the “find” command. find / -iname GeoIP.dat Will return a list of file paths where the file with this name is found. In my case I found: /usr/share/GeoIP/GeoIP.dat /usr/local/share/GeoIP/GeoIP.dat /opt/geoip/share/GeoIP/GeoIP.dat In my case the bottom link was the one

Show trailing whitespace in Vim

Vim is a wonderful command line text editor with syntax highlighting and everything you could ask for provided you turn on the functionality. Recently i was shown that it was also show trailing whitespace with a quick addition to the .vimrc file. All you need to do is add the following: set list set listchars=tab:→\