Ever needed to pull out data of a loop and assign different code to different results?. This handy little code snippet solves the problem, allowing you to assign an active class to the first data result row, and not to the rest. Could be any result row, but we needed the first!Read More
Recently we have to parse node values out of a number 600MB+ xml files into MySQL, this was causing dev machines to hang, taking forever and all sorts. So we decided to walk the XML files in shell and then pass the gathered data into a php file to then have that perform our Database inserts / updates etc.Read More
A simple but very powerful tool to perform database-wide string find and replace.
How many times do you need to alter data, found across many tables, this is one area that MySQL lacks in functionality.
However, with this handy little tool it becomes a breeze.
LetsEncrypt is genius - it allows full strength SSL certificates for free, backed by everyone that matters. Initial release was for Centos 7 and Debian mainly, which is not great if your running Centos / RHEL 6 + as most of the world is!Read More
We all run Apache servers, and if you do not tighten the Apache configuration, you are giving away useful information to hackers for free!
Having bespoke pages for common errors, page 404, 301 or 500 is a simple way to prevent useful data from being exposed, but we should all be doing more to ensure that our server is less attractive to hackers than the one on the next IP.
If you have gotten an SSL certificate either from the brilliant folks at LetsEncrypt (in which case you may be interested in
how to make them work on your Centos / RHEL 6 + server) or you have spent your hard earned on cash on buying one, you will still be faced
with the problem of getting Apache to reconise that you have this shiny new certificate and to use it!
How many times have you gone to a site and been presented with text containing boxed question marks? This is your browsers way of telling you it does not understand the textual symbol used, If the coder had used ASCII complaint codes as per the standard then your browser would not have this problem.
Of course the next question for coders is, "What is the code for....". So here are the most commonly used ones, well at least for us!
Quick and easy installation of HG Mercurial SVN on 'Nix servers as we all need somewhere safe to record not only our code, but a full audit trail of who did what and when.Read More
So you have gotten a nice new shiny site up for your clients. It is mobile friendly, stacks just fine and you think it runs pretty well.
However before you announce to all and sundry that it is finished, you need to have it pass Google's PageSpeed Insights else all your hard work will be in vain, as your mobile visitors will bounce as the site is taking too long to load.