OS X – Screen Capture

From “Tip of the Week: The Secret Screen Capture Shortcut”

Okay, you probably already know the ol’ Command-Shift-3 shortcut for taking a screen capture of your entire screen, and you may even know about Command-Shift-4, which gives you a crosshair cursor so you can choose which area of the screen you want to capture. But perhaps the coolest, most-secret hidden capture shortcut is Control-Command-Shift-3 (or 4), which, instead of creating a file on your desktop, copies the capture into your Clipboard memory, so you can paste it where you want. (I use this to paste screen captures right into Photoshop.)

What ruby 1.8.6 installs

A clean install of ruby yields the following files (relative to the install base):

/bin

erb
irb
rdoc
ri
ruby
testrb

./include

./lib

libruby-static.a
libruby.1.8.6.dylib
libruby.1.8.dylib
libruby.dylib
ruby

What readline installs

A clean install of readline yields the following files in relative to the installation base:


/include

/include/readline

chardefs.h
history.h
keymaps.h
readline.h
rlconf.h
rlstdc.h
rltypedefs.h
tilde.h

/lib

libhistory.5.2.dylib
libhistory.5.dylib
libhistory.a
libhistory.dylib
libreadline.5.2.dylib
libreadline.5.dylib
libreadline.a
libreadline.dylib

OS X – Copy to clipboard from command line

cat <file> | pbcopy

Generate ssh keys

To generate ssh keys

  • Make sure ~/.ssh exists, and has permissions 700
  • cd ~/.ssh
  • ssh-keygen -t dsa
  • ssh-keygen -t rsa

iTunes – Moving things around

I needed to move iTunes setup and music to another machine. I currently have a lot of music on an external drive on the first machine. I wanted to bring it onboard the second machine.

Discoveries along the way.

To completely reinitialize iTunes, simply remove all the contents of ~/Music/iTunes folder. Warning – all your authorizations etc will be lost.

~/Music/iTunes/iTunes Music Library.xml  contains information on all music in your library, including file locations for each album/track/..

~/Music/iTunes/iTunes Music contains the actual music

I copied everything in the folder ~/Music/iTunes from the old machine to the new machine – not including the contents of the ~/Music/iTunes/iTunes Music folder.

I copied everything in the folder ~/Music/iTunes/iTunes on the external drive to ~/Music/iTunes/iTunes on the new machine

I thought I’d have to change all the file appopriate file locations in ~/Music/iTunes/iTunes Music Library.xml, but mysteriously, iTunes figured it out and updated the file.

Remove Microsoft Office Manually from a Mac

A crude and drastic procedure to remove Microsoft Office X / 2004 from a Mac – it will probably wipe out any other Microsoft software and software settings as well so BEWARE.

* Remove /Applications/Microsoft Office or whatever directory has the applications

* Check parallel directory structures in /Library and ~/Library for directories in the list below

~/Library/Preferences/Microsoft
~/Library/Preferences/com.microsoft*
  com.microsoft.Entourage.plist
  com.microsoft.Excel.plist
  com.microsoft.OfficeNotifications.plist
  com.microsoft.PowerPoint.plist
  com.microsoft.Word.plist
  com.microsoft.autoupdate.plist
  com.microsoft.setupassistant.plist

~/Documents/Microsoft User Data

With a little care, any entries in Keychains.

Entries for the Exchange server
Entries for Microsoft applications

Remove Office and (from Microsoft) How to Remove Office V.x from your computer (applies to Office 2004 as well).

Moving iTunes from one machine to another

From a posting by Jim Paradise on the MacNN forums.

The easiest way to migrate iTunes to another computer, if you’re not using the Migration Assistant, is to first open the Preferences and select an external drive for your iTunes Music folder in the Advanced options. This will move the .xml files, etc., that have your playlists to the external drive. Then once that’s done, click the “Consolidate Library” option in the menu under Advanced. This will move all your music into the iTunes Music folder on the external drive.

So then you do the clean install, etc. When it comes time to get iTunes up and running again, copy the music folder from the external drive to your regular drive in your Home folder’s Music folder. This should set things up to how they were before (so that iTunes sees your playlists and music on the external drive). All you have to do to get your playlists and music to reside on your comp is to follow the steps in the above paragraph, but just done so that your Music folder is selected.

bash and hidden files

By default, bash inteprets ‘*’ to mean all files except those beginning with ‘.’.

If you want bash to include hidden files, then specify

shopt -s dotglob

This will include all files except ‘.’ and ‘..’. for the duration of the current shell.

If you want to include hidden files globally and permanently, add the command to the appropriate bash startup file (/etc/bashrc or ~/.bashrc).

TinyMCE and Grammar Checking

TinyMCE and Grammar Checking – quick scan.

Whitesmoke offers a TinyMCE plugin for Grammar, Templating and spelling. Uses Whitesmoke backend servers. See Whitesmoke and TinyMCE

and

WordPress Themes