Time Machine uses a specific metadata attribute to know which files and folders not to back up. We had a hint to that effect back in 2005.
It turns out that CrashPlan, the cloud backup service, uses the same metadata to determine what to back up. Macworld's Lex Friedman pointed me to a CrashPlan support article that looks at this, and that shows how to remove the exclusion metadata. To do so, you run the following command in Terminal:
Many podcasts feature a lengthy intro that you have to hear every time you listen to a podcast. If you, like me, listen to fresh news podcasts every morning, you have to skip introductions manually just to get to the news section. Wouldn't it be nice if podcasts were trimmed automagically? Here's the AppleScript for that.
The script is based on Doug Adams' Reset Tracks Start script (GNU GPL). My version of his script goes through every track in a playlist and sets track start time to 90 seconds (you can adjust this number to suit your needs). "News" is the name of my playlist; change accordingly.
property my_title : "Trim all tracks in a playlist"
tell application "iTunes"
set thePlaylist to playlist "News"
with timeout of 300 seconds
repeat with i from 1 to (index of last track of thePlaylist)
my reset_this(track i of thePlaylist)
end repeat
end timeout
end tell
to reset_this(t)
tell application "iTunes"
try
set start of t to 90.0
on error m
log m
end try
end tell
end reset_this
I use crontab to run this script every morning, but you can use iCal:
Create a recurring event (every morning at 7 am, for example)
Choose Alarm and select Run Script, locate the script file you've just created
Now, every morning at 7 am the script will quetly run and "trim" all the tracks in News playlist to make your mornings a little bit more efficient.
NB: "trimming" does NOT actually trim your tracks, it merely adjusts the starting point; this is totally reversible and instantaneous. If you want to undo this, just change 90.0 to 0.0 and re-run the script.
[kirkmc adds: This is sweet. The only problem is that different podcasts have different length intros. So what I'm going to do is make a number of scripts with different offset times and run them on selected podcasts, adding the podcasts as I want to a playlist on which the script acts.
I asked Doug Adams how to change this script so it acts on a selection rather than a playlist. He said to use the following:
property my_title : "Trim all tracks in a playlist"
tell application "iTunes"
set theSelection to selection
with timeout of 300 seconds
repeat with aTrack in theSelection
my reset_this(aTrack)
end repeat
end timeout
end tell
to reset_this(t)
tell application "iTunes"
try
set start of t to 90.0
on error m
log m
end try
end tell
end reset_this
You'll notice that only o couple if lines in the first part of the script are changed.]
You can benchmark the speed of your SSD or hard disk using a few simple Terminal commands. To test write speed:
time dd if=/dev/zero bs=1024k of=tstfile count=1024
In the output, you should look for something that looks like "bytes transferred in 16.546732 secs (519131791 bytes/sec)." Copy and paste the bytes/sec speed into Google to convert to MB/s (e.g. Google search for "519131791 bytes/s in megabytes/s").
To test read speed:
dd if=tstfile bs=1024k of=/dev/null count=1024
[kirkmc adds: While we're on the subject, here's an easy way to test data throughput from one disk to another. Open Activity Monitor (in /Applications/Utilities), click on the Disk Activity tab at the bottom of the window, then look at the Data read/sec and Data written/sec numbers. Copy a large file from one disk to another to see how fast it can go. FWIW, my new Thunderbolt drive has throughput of about 100 MB/sec.
You can run the above commands while watching the information in Activity Monitor, and skip making the conversions. This shows that I have a peak read speed of 137 MB/sec, and a peak write speed of 151 MB/sec (an SSD in a Mac mini). The commands above will give you average speeds, whereas Activity Monitor shows the speed in real time, as well as peak speeds.
See the comments below for what may be a better approach.]
I was never satisfied with results of "Reduce File Size" Quartz filter when trying to make some PDFs smaller before sending them by e-mail. It made them too small, and the graphics were fuzzy.
I eventually found where these filters are:
/System/Library/Filters
I was delighted to find out they're XML files easily editable with TextEdit (or any other text editor). I also found why this particular filter makes quite unusable PDFs, as these parameters were just too low:
Compression Quality 0.0
ImageSizeMax 512
So I copied this file to my Desktop, and then made two more copies of it, and called them Reduce File Size Good, Better and Best. Then I changed the parameters of each file to 0.25, 0.5 and 0.75 for Compression Quality, and used these three values for ImageSizeMax:
842 (that's A4 at 72dpi)
1684 (A4 at 144dpi)
3508 (A4 at 300dpi)
Finally, I changed the default string for the Name key at the end of each file to reflect the three settings, so they display the names I have given them in the menu.
Then I copied them to a /Library/Filters folder I created (for some reason, ~/Library/Filters doesn't work in Lion) and now when I open a picture or PDF in Preview, I have the option of four different qualities for reduced file sizes.
As an example, I have a JPEG of scanned A4 invoice at 300dpi and it's 1.6MB. When exporting to PDF in reduced size, the file is only 27 KB and it's quite unusable - very fuzzy and hard to read. The Good one is much easier to read, slightly fuzzy and still only 80 KB. Better is 420 KB and clear, and the Best is 600 KB and almost as good as the original even on a laser printer.
[kirkmc adds: Interesting hint. I see this as useful only for creating PDFs from files. If I'm scanning something, and I don't want the file to be too big, I'll either scan it at a lower resolution, or change the resolution in an image editor before making a PDF.]
I don't take a lot of photos, and don't use Aperture, but when I stumbled on this Apple tech note, I had a feeling that it might be useful to those who take a lot of pictures.
Apple explains how to use a "unified photo library with iPhoto and Aperture." Setting up the unified library isn't rocket science, but the document lists a number of limitations that are good to know about. If you use both programs, read this document to see how to share a library, and to see what you can and cannot do with each program.
In a conversation on Twitter yesterday, Daniel Jalkut, of Red Sweater Software, asked whether there was a way to find out what entitlements a sandboxed app has. Brian Webster, of Fat Cat Software, shared the solution. Apparently, this command provides the information:
codesign -dvvv --entitlements - /path/to/app
(Replace "/path/to/app" with the path to the application.)
Not being a developer, I don't know exactly what this all means, but to those readers who are developers, this may be useful.
If you have a Retina MacBook Pro, you'll find a new checkbox in the Get Info window for an application: it says "Open in Low Resolution." This box is checked for Pages, for example. Unchecking it cleans up the text enormously. Why would the box be there and why is it checked for iWorks packages? (And is there any harm in unchecking it and getting clearer text?)
[kirkmc adds: Can't test this one, unless someone wants to send me a Retina MacBook Pro... If anyone has insight into the questions at the end of the hint, feel free to comment.]
I needed an automated way to disable/enable iPhoto sharing with ControlPlane. I used GUI scripting in AppleScript to accomplish this task. The most recent version of the script below can be found here.
How to run it: osascript toggle_iphoto_sharing.scpt "disable" "no"
- the first parameter is the status to set sharing to - disable or enable
- the second parameter is whether or not to start iPhoto to make the change
Note: iPhoto must be running for this script to change anything.
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
on run argv
set a_stat to (item 1 of argv)
#set a_stat to "disable"
set start_iphoto to (item 2 of argv)
set do_work to "no"
if not appIsRunning("iPhoto") then
if start_iphoto is equal to "yes" then
set do_work to "yes"
end if
else
set do_work to "yes"
end if
if do_work is equal to "yes" then
tell application "iPhoto" to activate
tell application "System Events"
tell process "iPhoto"
click menu item 3 of menu "iPhoto" of menu bar 1
click button "Sharing" of tool bar 1 of window 1
if value of checkbox "Share my photos" of group 1 of group 1 of window 1 is equal to 1 then
if a_stat is equal to "disable" then
click checkbox "Share my photos" of group 1 of group 1 of window 1
end if
else
if a_stat is equal to "enable" then
click checkbox "Share my photos" of group 1 of group 1 of window 1
end if
end if
click button 1 of window 1
end tell
end tell
end if
end run
Cabel Sasser of Panic shared something interesting on Twitter yesterday. He said that running the following command will highlight images that haven't been upscaled by doubling their size:
I don't have a retina MacBook Pro to test this, but this should be useful for developers, or simply for others who want to see which images are native retina resolution and which are not.
My Macworld colleague Dan Frakes tweeted recently about something he stumbled on when viewing Flash videos on YouTube. Using the J, K and L keys, he found that he was able to skip ahead and back, and pause or play these videos.
Use the following keys to:
J - skip back 10 seconds
K - pause/play
L - skip forward 10 seconds.
These only work with Flash videos; if you load HTML5 videos on YouTube, these shortcuts don't work.
It's worth noting that some websites mention that you can use arrow keys and the spacebar to perform the above actions, but these don't work on Macs.
Why don't you try it out with this video by one of my favorite artists, The Grateful Dead, performing Ripple, from a concert I attended more than 30 years ago.