Just over a year ago when I moved into my flat, I found myself at a loose end in that time between moving in and the Internet connection being set up. Having exhausted all my films, and played my fill of Red Alert, I was in desperate need for something to do.
This PHP script is the culmination of that free time; a command line script that can turn basic HTML strings into something that can be displayed…
A couple of years ago I implemented a coding standards guide for PHP development at TMW, as I'd noticed that they only had a document that was focused on .Net and Windows. The guide outlined mostly common sense practices, such as avoiding certain unsafe language functions, and how to best indent and document your code. Just over a year ago I made this document public on the TMW GitHub account, and…
When setting up a new project it's often required to set up the same old directory structures. You could do this manually, but where's the fun in that? You can do this much more quickly in the terminal with brace expansion.
Consider the following directory structure:
project_dir
www
img
js
css
logs
This entire directory structure can…
I recently had a requirement at work to product a sitemap (in the form of a basic list of URLs in a text document). Normally, I'd have a look at one of the various online sitemap generators, but they tend to stop indexing at a few hundred pages and require payment to index the rest; and the site in question contained around 7000 pages, spanning across mobile and desktop.
Faced with this, I set about…