Blog

How to re-size a VirtualBox Virtual machine

How to re-size a VirtualBox Virtual machine
I have recently had to re-size my Ubuntu development VM twice as I keep adding Drupal sites and their files to my local dev environment. It is basically pretty simple but can be quite time consuming, I am writing this as I wait for one of the steps to complete myself! I have just installed a new hard drive for the new VM so I am moving the location of the "Default Machine Folder" as will from the VirtualBox GUI, doing this before making the initial clone is the easiest way to do so.

Searching remote web servers for files

Searching remote web servers for files
A command line PHP script for searching and downloading from web servers with directory listing enabled.  There are many web servers online today with directory indexing and browsing left enabled, this is either a mistake or people actually want you to be able to search and browse their files and resources. Being able to find these servers is the first point of interest as you won't know how useful they can be until you have seen what some people host publicly. Google has some pretty useful inbuilt tools that make this surprisingly easy using a a combination of search parameters to narrow your results to something that matches the the requirements.

Stay logged in to Okta SSO

Stay logged in to Okta SSO
If you have any Single Sin On system you have to use on a regular basis then the chances are that you find having to log in over and over again to access your normal sites in extremely tedious. Having experienced this in the past I decided to make a Tampermonkey script to save me the hassle. Tampermonkey is extremely easy and user friendly to use, it is a chrome extension that allows you to execute JavaScript on any web page you like as if it were embedded in the page it's self. First of all install the Tampermonkey Chrome Plugin. Now you have tampermonkey just open the user interface and add this script, remember to change the URL of the page you want to target and add y

Customising theme_link to always add a relevant title tag for the SEO of your site

Customising theme_link to always add a relevant title tag for the SEO of your site
When building this site I wanted the links to all have the site name in the title tag as the keywords in the site name are what I want to be indexed for by Google. To do this I have made a simple theme_link function override to append the site name to the title tag if it is not already present.

Drupal 7: Automatically link taxonomy terms in body content

Drupal 7: Automatically link taxonomy terms in body content
Auto tagging of terms from a vocabulary associated with a node is reasonably simple using some existing contributed modules but if you want to dynamically insert a link to that taxonomy terms page it is not so straight forward as there are no modules that I know of that do this for you.  I wanted to add this functionality to this site to make it easier to find content about subjects like Drupal and PHP whilst reading related posts and to help with SEO and Google crawling my pages.  The example below is something I have written for myself so there are no frills or admin interface as I don't need anything like that. 

Pages