Posts

Showing posts from February, 2013

Mac to Cisco router - serial connection

MacBook Pro 6,2 running 10.6.8 Obviously no serial port on the above so how to go about connecting up a Cisco console cable? http://plugable.com/products/PL2303-DB9 These pointed me in the right direction: http://hints.macworld.com/article.php?story=20080218140558128 - particularly the comments and using 'screen' http://forums.whirlpool.net.au/archive/691299 http://stevenwinterhalter.com/2011/08/26/how-to-connect-your-mac-to-a-cisco-console-port/ In short buy the above USB adapter, install the enclosed "driver", connect up cable, power up and run: screen /dev/tty.usbserial 9600 in the terminal. Bosh. Your in. To get out: I can't quite remember what worked for me. I think it was: "Ctrl-a d" to detach window

Indesign scripting - negative object reference

Quick reminder: When scripting Indesign a negative object reference means the "last" of something. eg myTextFrame.insertionPoints.item(-1).place(myTextFile); // the end of a text frame or from the Scripting guide: Note that you can use negative numbers to refer to the layers in the layers collection of a document. Layer  -1 refers to the last (bottom) layer in the collection. eg layer(-1); Beware of dynamic collections of objects. Messing with them will change references to items: http://cssdk.host.adobe.com/sdk/1.0/docs/WebHelp/app_notes/id_scripting.htm#Dynamic_collections_and_object_types

VMware Fusion bridge not working

I stayed up far too long last night figuring this out, so a post is warranted. VMware Fusion 3.1.3 on Mac 10.6.8 running Debian 5 (lenny) VM. NAT working fine but for some reason it just wouldn't work in bridged mode. I was trawling the t'internet for reasons why when it dawned on me, after reading that for some folk it worked with wired internet, but not wirelessly. If your wireless network is locked down to MAC addresses (access control) then your VM running in bridge mode won't be able to pick up an IP address because... ...it has a different MAC address! Obvious isn't it... grrrrr. I wanted to run in bridged (always used NAT before) so I could connect to services run by the guest OS from the host. I was playing with vnc4server and trying to connect to debian using the Mac Screen Sharing built in app. As an aside don't bother, the base install already comes with remote desktop (vino) which must get in the way as I had all sorts of difficulty. Runnin...

bash nav

From here: http://www.skorks.com/2009/09/bash-shortcuts-for-maximum-productivity/ Ctrl + a – go to the start of the command line Ctrl + e – go to the end of the command line Ctrl + k – delete from cursor to the end of the command line Ctrl + u – delete from cursor to the start of the command line Ctrl + w – delete from cursor to start of word (i.e. delete backwards one word) Ctrl + y – paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor Ctrl + xx – move between start of command line and current cursor position (and back again) Alt + b – move backward one word (or go to start of word the cursor is currently on) Alt + f – move forward one word (or go to end of word the cursor is currently on) Alt + d – delete to end of word starting at cursor (whole word if cursor is at the beginning of word) Alt + c – capitalize to end of word starting at cursor (whole word if cursor is at the beginning of word) Alt + u – make uppe...

less navigation

Command line tools, gotta love em, but of you don't use them on a regular basis; how to remember everything? I need to get to grips with a built in terminal editor: vim or emacs? (if anyone decides to start yet another flame war on the back of this don't bother...) I uses nano/pico but that's somewhat limited and as less uses vim navigation it seems another push towards using vim. Anyhoo... here's a site with a few useful shortcuts: http://www.thegeekstuff.com/2010/02/unix-less-command-10-tips-for-effective-navigation/