Archive for category geekery

Quickly search for a file on a (PC) server from a Mac client

Searching for files on a Windows server from a Mac can be very slow or even fail altogether but with a bit of shell trickery it’s very quick.

The script below is 95% instructions – the payload is at the end – that’s the line of code you’ll need to adapt for your search.

# Here's a simple shell script to search the server for a file(s) who's name you know
#
# 1. Specify the folder you want to search
# 2. Change the script to look for the file name
# 3. Job done
#
# 1 2 3
# Open Terminal and type "cd " (with the space) at the promp. 
# Hit ENTER
#
# From the Finder drag the folder you want to search onto 
# the Terminal window, ENTER
# (You are now "in" the folder you want to search)
#
# Change the script below to use your search for your file
# (keep the wildcard *s and the quote marks)
# NB you can add the wildcard into a search too
# eg: "*Need*stack*" will find "A needle in a haystack.psd"
#
# Copy and paste into the Terminal window, ENTER
# (The search is case insensitive)
 
find . -iname "*Needle_in_a_haystack*" -print

No Comments

A simple regex rename with Adobe Bridge

Adobe’s Bridge application has a very handy built-in file renaming utility. If you need to add a suffix, a numeric prefix or do a simple string substitution it’s ready and waiting just a keystroke away…

But for more complex string substitutions regex (from REGular EXpressions) come to the rescue!

Here’s a simple problem – you need to rename the first 6 characters of a series of files with a consistent file naming convention…

Fire up the batch renaming dialogue ([SHIFT]+[CMD]+R on a mac) – it’s under the Tools menu. Select your files, choose String Substitution from the dropdown, and check Replace All and Use Regular Expression as in the screenshot below.

The magic regex is in the Find field:
^.{6}

Explained

The “^” (a caret AKA “up-arrow”, “chevron”, “control character”) denotes the beginning of the search; the dot “.” denotes any kind of character and finally the “{6}” means six of.

Easy peasy.

No Comments

Quick and dirty DVD editing in iMovie

Got your own content want to re-edit quick-like using iMovie. Use MPEG Streamclip to export to MPEG-4. Import into iMovie. Edit.

If you’ve got a bunch of VOB files on a DVD of non-copy protected stuff (home movie telecine etc) use the same tool to convert the DVD into a AVI or other format file. Don’t forget that if you’re on a Mac you may want to watch any resultant AVI using VLC!

, ,

No Comments

A Flickr slideshow iFrame in WordPress?

A-ha! So this is how it’s done…

For the full experience you’d need a canvas (or theme) that accommodates the Flickrslideshow minimum dimensions which are roughly 580px wide x 360px high. Right now this site’s main content div is only 500px wide – so there’s a bit of clipping on landscape images. But not enough to worry about too much just yet.

The code is this: <iframe style="border:0" width="500px" height="400px" src="http://www.flickr.com/photos/lazydada/sets/72157603491230286/show/">

, , ,

No Comments

miscellany

The Flashing Blade.

Currently here. Childrens’ TV from way back in the seventies. You remember this one? I do. The theme tune is baked into my memory for ever.

Flickr viewer

Tiltviewer is a very cool way to see your Flickr stream. Or mine. I like what it does; somewhere between a slideshow and browser. Much cleaner interface than Flickr’s pages. Smells of the future. Very clever. Here is their ‘ome page, Mr ‘iggins.

Carbon Copy Cloner

I’ve stumbled upon the fact that this backup software stalwart for Mac OS X has finally been updated. Time to give it a whirl again. Which reminds me …

Hard-drive upgrade. Again.

Not quite two years since the last upgrade I’ve done it again. This time not precipitated by a dead-disk but by a severe lack of space. 160GB drive swapped out from my LaCie external drive. Not a quick fix but a good one. And I took to opportunity to give the old girl a good clean. How nice. Shinny Aluminium. Thanks to the folks at iFixit for the online guide.

Photogasm

Last but by no means least. My friend Mick Partridge created Jude Edginton’s website. Jude’ photo’s are really very good. Really. Nice site Mr. Partridge.

, , , ,

2 Comments

How’s your php.ini?

Mine’s just fine now. When trying to upload a photo via WordPress’ interface I used to get this error:

Fatal error: Allowed memory size of 8388608 bytes exhausted

Couldn’t find a quick fix and worked around it using Flickr until today.

Recently MediaTemple sent notification of a default change to all their users’ environments. In the FAQ they sent out – out jumped said error message. The fix, easy: FTP into the affected account and edit the php.ini file in /etc/ .
A quick change of “blankety-blank” in: memory_limit = [blankety-blank]
to “100M”, hence: memory_limit = 100M.

Robert is my sons’ mother’s brother.

,

No Comments