Archive for the 'Tips' Category


Photoshop Tip: Zoom While Transforming

Sunday, March 2nd, 2008

When you use Adobe Photoshop day in and day out, certain things about its interface and workflow start to grate on you, like the inability to zoom while in the middle of a transform or applying Layer Effects. Much to my delight, Photoshop is also jam packed with hidden commands and modifier keys, which turned up a discovery today, shown here:

If you’re in the middle of a Transform or Layer Effects change and need to get your changes just right, you can adjust your view simply by holding the correct keys and using your mouse. On the Mac, hold Space and drag to pan around the background window. Command-Space-click on the document to zoom in, and Command-Option-Space-click to zoom out. Note that some of these key combos collide with the system-wide Spotlight commands, so you may consider remapping them in System Preferences, depending on your usage of each. Personally, I’ve moved Spotlight to Control-Space just to use these great hidden features of Photoshop.

How to Test RAM Under Mac OS X

Friday, January 11th, 2008

New RAM!
RAM SO-DIMMWhenever I get a new stick of RAM for my Mac or PC, I’m always eager to just plug it in and start using it to its fullest, but having worked on hundreds of computers and encountering dozens of bad memory modules has convinced me that thorough testing a must. While off-the-shelf PCs can run a copy of the free — and very handy — Ultimate Boot CD tool to perform RAM tests, Macs are a little bit more complicated in this respect. If you’ve purchased AppleCare for your Mac, it comes with a bootable TechTool Deluxe disc, but you’re otherwise left to your own devices when it comes to hardware issues.

A Note About Single User Mode
Fortunately, with a little preparation right now, you can boot your Mac into Single User Mode and do a complete RAM test in the future. While you can run the necessary software in a fully-booted system, I recommend doing testing in Single User Mode where there are far less programs loaded in memory, and less chance of an important system component getting corrupted if your machine freezes or kernel panics — common symptoms of bad memory. A modified Mac OS X boot CD would be ideal, but that’s another post for another day!

Software Setup
The testing setup isn’t terribly complex; I’ve taken the liberty of putting together an installable package which will put the Memtest utility and its man page entry in your /usr/bin/ and /usr/share/man/ folders, respectively (if you wish to put them elsewhere, you can always just extract the contents of the .pkg with Pacifist). Memtest is a Unix command-line program that does the memory testing, and is the Mac equivalent of MemTest86.

Memtest Usage
To run memtest on a new memory module, first shut down your computer and install the new chip. (Some helpful guides for doing this can be found at iFixit, if you’re unsure of the exact steps.) Ensure the chip is firmly in place, close up your machine (or don’t, if you’re a pessimist), and power it on while holding down the Command and S keys to force Mac OS X to boot into Single User Mode. Once you see a black screen with white text, you can release the key combination. After all the system logging is done scrolling past, type memtest all 2 to test ‘all’ memory ‘2′ times. Two passes should be enough to detect any blatant problems, but I wouldn’t hesitate to let it run for hours on end if I suspected an intermittent memory problem (memtest all). When complete, you should be greeted with “All tests passed” if your new RAM is in good condition. If your system locks up or freezes indefinitely during the test, you may have a bad memory module on your hands.

PHP5 and MySQL 5 on Leopard

Thursday, December 6th, 2007

A few quick notes about building MySQL 5.x and getting it working under Leopard:

  1. Follow Dan Benjamin’s excellent MySQL on Leopard tutorial.
  2. Copy the PHP configuration example to the actual expected location: sudo cp /etc/php.ini.default /etc/php.ini
  3. Edit it, and add /private/tmp/mysql.sock to both mysql.default_socket and mysqli.default_socket.
  4. Save, and restart Apache: sudo apachectl graceful

Once completed, the default PHP5 setup that comes with Mac OS X 10.5.x will be able to communicate with the MySQL version built using the above linked tutorial. Time to get developing!

How to Import and Export ICNS with Photoshop

Monday, November 26th, 2007

Unison ICNSIf you’re interested in making replacement icons for Mac OS X applications, the Leopard Developer Tools received an updated version of the Icon Composer utility, which combines multiple PNG images into one ICNS file. Once exported, the combined file is suitable for use inside an application bundle, by choosing Show Package Contents from the Finder’s action menu (or a right-click) and browsing to Contents/Resources/ and replacing the appropriate ICNS file (make sure to rename your icon to match the existing one!).

To run the process the other way, first find the desired ICNS file inside the application, and open it with the built-in Preview application. Preview understands the transparency inherent to ICNS icons, and allows you to save the file as a PNG, ready to open and work on in Photoshop!

11/28/07 Update
After looking around on MacUpdate for something simple, I found img2icns, a freeware drag-and-drop icon converter that can turn a PNG image into a folder icon. With it, you can Get Info for the converted folder icon and copy and paste it onto another application or document. It’s the perfect little icon utility to go with this minimalist workflow, and it’s Leopard-ready!