Posts

diff between directories

Whoa, no post for a while...! Compare directory contents using diff: diff -qr dirA dirB | grep -v -e 'DS_Store' -e 'Thumbs' | sort > diffs.txt obviously change dirA & dir B to whats required. *Need to look at the grep filter to ignore all invisible "._" files Found this here: http://hints.macworld.com/article.php?story=20070408062023352

ssh delays

So, delays ssh'ing into my dev box on LAN at home. Check this for probable Kerberos issues getting in the way: http://macnewbie.wordpress.com/2006/08/30/slow-ssh-connections-on-mac-os-x/ :)

Regex Lookahead/Positonal Assertions

Quick post that probably won't help if I try to remember how to do this. Large txt file (happens to be vCalendar), and needed to chop out whole heap of text to make it v1 compatible for my mobile phone... Anyhoo, a whole bunch of text between two strings had to come out whilst open in TextWrangler so this was the regex used: DTSTAMP:[\S\s]*?(?=SUMMARY) The first question mark after the "*" make the match 'non-greedy' then the (?=yourKeyWordHere) bit is a lookahead assertion. Along with lookbehind they're collectively called "lookaround" http://www.regular-expressions.info/lookaround.html

Flash, AS3 and component skinning

Am getting into Flash and Actionscript. Late handing in my TMA for my Birkbeck course, which means a penelty hit on my mark but have learnt loads from not lowering my standards and getting AS3 to do what I want :D Component Skinning. Wanted to have a form validated for input and highlight each input field (in Red) when a problem occurs. Took a whole heap of reading and searching t'internet but have eventually sussed it. The following links help: 1 http://www.adobe.com/devnet/flash/articles/creating_as3_components_pt5_07.html 2 http://www.adobe.com/devnet/flash/articles/skinning_flash_cs3_03.html 3 http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7f45.html will amend with further details once I've given the kids lunch (am getting pestered!)

Indesign Snippets

Just drag an Indesign object (txt, picturebox, etc) onto your desktop, or File->Export 'Indesign snippet'. Creates a little XML file which if you 'Place' or drag back into a new indd doc will appear just as the original and using the same xy coords. Nice :) Just lookout if you export from a spread into a single page doc, it might not appear!

Unix titbits

find . -newermt '30 seconds ago' -print find ('.' = files in current dir and subfolders thereof) -newermt (an option, see man page) (files changed within) '30 seconds ago' -print (don't forget to print the results to std output) :D find . \! -name ".DS_Store" -type f -print find only plain/standard files (-type f) NOT called .DS_Store (\! -name ".DS_Store")(NB escaped !)

Mac OS X - Unix

When MacOS became Mac OS X I was initially skeptical, thought it was slow and not all that... How wrong I was. Amongst a multitude of other things, one of the great aspects of this OS is it's Unix underpinnings. If it hadn't been I'd have probably never dabbled with Unix and the power that comes with the CLI. Nice :)