Category Archives: Technology & Code

Technology, gadgetry and code are just plain awesome, you can’t really deny it. So when I come across something that excites me or makes my life easier or simply gives us a view as to a very possible future that we might be moving towards, I can’t help but share it with the rest of you here on the CodeUnit of Craig.

MySQL: Average Time Difference for Datetime Records

If your table contains two datetime columns for which you wish to calculate, and display in readable format, the average time difference for the entire table, the simplest (and probably fastest) way to achieve this is by doing the calculation … Continue reading

Posted in Technology & Code, Tutorials | 4 Comments

Tip: Bring a Command Prompt up during Windows Setup

Windows Command Prompt

Sometimes, (and this is probably damn seldom if you think about it), you just NEED to run some or other command from the command prompt in the middle of a fresh Windows installation and setup, and luckily for you, Microsoft … Continue reading

Posted in Technology & Code, Tutorials | Leave a comment

Namechk

Namechk Screenshot

I like signing up to all the wondrous sites and sounds of the Internet using a particular username or vanity name if you must (namely craiglotter in case you were wondering. Admittedly not highly original, but thankfully not particularly common, … Continue reading

Posted in Software & Websites, Technology & Code | Leave a comment

Ubuntu Linux: How to Add a User Account to a Specific Apache Password File

Tux the Penguin

There are a variety of ways you can make private your Apache-driven web content, but without a doubt the most common way is simply to add a .htaccess file in the folder you wish to protect and add the following … Continue reading

Posted in Technology & Code, Tutorials | Leave a comment

MySQL: Duplicate a Table

MySQL logo

Well funnily enough, it’s actually pretty damn simple. The CREATE TABLE IF NOT EXISTS phrase is key here and combining this with a select statement will in fact create a copy of your existing table, taking all the data from your source table and dumping it into your newly created clone table. Continue reading

Posted in Technology & Code, Tutorials | Tagged , , , , , | Leave a comment