Organising 162,356 files using FDUPES and NameMangler

I’m a data hoarder; there I said it.

I’ve been taking digital photos since around 2002; over the years and many computers / hard drives i’ve moved, copied and added to a ‘temp folder’ countless image and video files. In the back of my mind i’ve always said ‘i’ll sort these later’, only to find that weeks and months pass, and as a result, the next batch of images have been added to yet another folder. Periodically I attempted to organise my photos and videos using Adobe Lightroom (and for a time it was really useful); the file renaming feature helped me organise into year, month, day folders (using the EXIF data embedded in the images). Unfortunately I forgot to backup my Lightroom catalog from a Mac during a reformat (dumbass) and after spending so much time organising in Lightroom I felt somewhat defeated.

More months and eventually years pass; my once organised directory of images had hopped around from external drives to cloud storage and back again, and as a result I had duplicated the main folder and in some instances added images and in others not. Disaster.

More

W3TC and .htaccess path manipulation

I had an issue recently with some shared hosting and W3 Total Cache; basically the root path wasn’t being declared correctly via the default configuration of the plugin. I came up with a slight modification to the /inc/define.php file (DISCLAIMER: this is a hack, if you use this your warranty is void / bad things may happen):

Original code:

function w3_get_home_root() {
if (w3_is_network()) {
$path = w3_get_base_path();
} else {
$path = w3_get_home_path();
}
$home_root = w3_get_document_root() . $path;
$home_root = realpath($home_root);
$home_root = w3_path($home_root);
return $home_root;
}
Code language: PHP (php)

 Modified code:

function w3_get_home_root() {
if (w3_is_network()) {
$path = w3_get_base_path();
} else {
$path = w3_get_home_path();
}
//$home_root = w3_get_document_root() . $path;
//$home_root = realpath($home_root);
//$home_root = w3_path($home_root);
<em>$home_root = '/var/sites/YOURSITE/public_html';
</em>return $home_root;
}Code language: PHP (php)

As you can see; it basically involves hard-coding the path to your root directory. 9/10 this won’t affect you but on some shared hosting this problem can occur (you’ll get errors in the W3TC control panel about root paths not being set).

Enabling read/write on external drive shared between OS X and Linux (Ubuntu)

Okay, so i’ve had a 1TB external USB for a while which has been formatted for OS X use (HFS+). I’ve been doing a lot of work on Linux (Ubunut 14.04) recently and wanted an easy, fast way to be able to read/write on both operating systems. I dabbled with this briefly a while back but was unsuccessful, but recently I found a little trick to enable read / write on both OS’s! This may seem like basic setup to some, but judging from the amount of forum posts i’ve read on this, it does seem to fox a lot of people…

NOTE: there is a caveat to this; I don’t share this drive with any other computers. If you move a drive between machines then this solution isn’t for you. Read on to find out how to enable this!

More