Mounting Mac OS X Disk Images with Shadow Files

- Posted in Uncategorized by
Mount with Shadow: hdiutil attach -owners on original.dmg -shadow Unmount: hdiutil detach /dev/disk# Commit changes: hdiutil convert -format UDZO -o new.dmg origianl.dmg -shadow

Calling Applescript from Perl

- Posted in Uncategorized by
:::perl sub osascript($) { system 'osascript', map { ('-e', $_) } split(/\n/, $_[0]); } and to use it: :::applescript osascript <<END; tell application "Finder" display dialog "Hello" end

Using Screen

- Posted in Uncategorized by
screen starts session ctrl-a, D detach session screen -r reattaches to session

MySQL on Mountain Lion Server

- Posted in Uncategorized by
Download MySQL Install Install Startup Item Install PrefPane Set up shell aliases Copy config to /etc/my.cnf Add socket to /etc/my.cnf mkdir /var/mysql chmod _mysql /var/mysql ln -s

Lowering XProtect

- Posted in Uncategorized by
We needed to use older versions of Java for a few business apps. Apple would update the XProtect file which would disable older versions of Java. We use this script to lower the blocked version to

Ditto

- Posted in Uncategorized by
Using ditto to zip up a folder: ditto -ck --sequesterRsrc {source} {destination.zip} Using ditto to unzip: ditto -V -x -k --sequesterRsrc --rsrc {source.zip} {destination}

Resetting mailman passwords

- Posted in Uncategorized by
If you forget your list password for a mailman list in plesk, you can use the following: /usr/lib/mailman/bin/change_pw --domain=domain.com --password=password where domain.com is the domain

Field Tech Toolkit

- Posted in Uncategorized by
Here is a list of what is in my usual field tech toolkit. Screwdrivers: Smart Pro Precision Extendible 12-in-1 Kit - $9.99 - Model #SPT4500 Husky 6-in-1 Reversible Screwdriver - $6.98 - Model #74361

Useful Plesk Commands and Hints

- Posted in Uncategorized by
Mail is stored in /var/qmail/mailnames/DOMAIN.TLD Recalculate stats now /usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=DOMAIN.TLD

htaccess redirects

- Posted in Uncategorized by
Redirect www to non-www: :::apache RewriteEngine On RewriteCond %{HTTP_HOST} !^my-domain\.com$ [NC] RewriteRule ^(.*)$ http://my-domain.com/$1 [R=301,L] Redirect non-www to www:
Page 3 of 4