Rip Blu Ray’s on your Mac
MakeMKV lets you rip DVD’s and Blu-Ray discs easily in Mac OS X (or Windows or Linux for that matter), and during the beta, the program is free! Each beta release works for 60 days and then it automatically stops functioning, so go ahead and grab the beta version for some free blu ray ripping. The process is simple and straight forward, select the source Blu-Ray or DVD, select an output location, and click “Make MKV” then wait. Blu-Ray’s take a while to rip, and obviously you’ll need a blu-ray drive on your Mac to have that functionality. DVD’s are relatively quick to process, in about 20 minutes you should have a finished dvd rip.
Features of MakeMKV include:
- Reads DVD and Blu-ray discs
- Reads Blu-ray discs protected with latest versions of AACS and BD+
- Preserves all video and audio tracks, including HD audio
- Preserves chapters information
- Preserves all meta-information (track language, audio type)
The program is cross platform compatible so if you want to use it in Windows or Linux that’s fine too. Note that although the Blu-Ray ripping functionality expires after 60 days with the beta program, the DVD ripping ability will still be maintained.
When and How to Reset your Mac’s System Management Controller (SMC)
Your Mac isn’t working!
You’ve tried rebooting, you’ve zapped the PRAM, you’ve done it all, but your Mac is still behaving strangely. What next? In certain circumstances, try resetting your Mac’s System Management Controller (SMC). This is sometimes necessary to restore normal lower level system functionality to your Mac, particularly if you’re having these types of problems:
- Issues with your Mac’s cooling fans and fan management: fans run constantly at high speed, fans run high despite low CPU usage and adequate ventilation, fans not working at all, etc
- Power management and battery problems: Mac isn’t turning on, sleep isn’t working, random shutdowns and reboots, battery isn’t charging, Mac won’t wake from sleep etc
- Light problems and improper lighting management: battery indicator lights aren’t working, display backlighting isn’t adjusting to ambient light changes, keyboard backlights not working, etc
- Video and external displays not working: display brightness functionality not working properly, target video mode isn’t working properly, external display isn’t working, etc
- General performance and functionality problems: abnormally sluggish behavior despite no CPU or disk usage, external ports not working, airport & bluetooth aren’t showing up, external devices are not being found, etc
So now that you’ve concluded you need to reset your SMC (Note that the SMC is on Intel Mac’s only), here’s how to do it on MacBook’s, MacBook Pro’s, iMac’s, Mac Mini’s, and Mac Pro’s. Notice that the reset instructions are different for MacBook and MacBook Pro’s if you have an internal or detachable battery.
Reset the SMC of a MacBook or MacBook Pro’s with detachable batteries:
- Shutdown the MacBook/Pro and remove the battery
- Disconnect the power adapter, hold the Power Key for 10 seconds
- Release the power key and reconnect your battery and power adapter
- Turn your Mac on
- Let boot as usual
Reset SMC of a MacBook or MacBook Pro’s with an internal battery:
- Shutdown your MacBook/Pro
- Connect the power adapter to your Mac
- On the MacBook/Pro’s keyboard, hold down the Shift+Control+Option keys and the Power button at the same time
- Release all keys and the power button at the same time
- Boot your Mac as usual
Reset SMC of an iMac, Mac Pro, Mac Mini:
- Shut down your Mac
- Disconnect the power cord
- Press and hold the Mac’s power button for 5 seconds
- Release the button
- Reattach the power cables and boot the Mac as usual
Hopefully that will clear up your problems, if not it might be worth a visit to the Apple Store or a certified repair center.
Check links in outgoing Mail.app messages before sending
There’s no way to test hyperlinks in an email you’re composing without carefully selecting the whole URL, copying, switching to a browser, pasting, hitting return -- quite a bother if you’re writing a newsletter, for example, with lots of links.
But there’s a simple solution: Save your email as a draft with Command-S, then look at the email in the drafts folder of the Message Viewer window. In that view, all links are highlighted and clickable.
Use Spotlight to speed up grep searches
The grep -ri
command (recursively search for matches, ignoring case) in Terminal is incredibly useful, but incredibly slow. In OS X, we can leverage mdfind
to quickly find the files containing our search string, then use grep
to find the strings within only those files. Here’s a script to do just that.
#!/bin/bash # # Spotlight metadata find and grep by Daniel.Hoherd at gmail dot com ## Check for at least two arguments, print usage if else if [ $# -lt 1 ] ; then echo "usage: $0 searchstring [dir or file] [dir2 or file2]" exit ; fi ss=$1; shift; files=$@; until [ -z "$1" ] ; do thisitem=$1 onlyin="-onlyin ’$thisitem’ $onlyin" shift done; eval mdfind -0 $onlyin "$ss" | xargs -0 grep -Hi "$ss"
Leveraging mdfind
to eliminate files that do not contain the matching string makes this operation an order of magnitude quicker, cutting it to mere seconds instead of minutes on over 100GB of data in my tests. The downside to this is that Spotlight does not index every directory, so you may be missing some files such as system files.
If you don’t want to use this script, the same thing can be accomplished by hand by writing mdfind -0 -onlyin searchdir searchstring | xargs -0 grep -Hi searchstring
. I’ve included the -H
and -i
options to more closely match the output of mdfind
, but you can safely remove them.
by: lullabud, source: www.macosxhints.com
Copy iTunes library from a PC to a Mac
If you’re moving from a PC to a Mac, then you’ll probably want to move your iTunes library with it. This will cover moving an iTunes library from a PC to a Mac using iTunes 9 and iTunes 8 by consolidating all music files into a single transportable library that can then be copied over to your Mac.
Move your iTunes library from a PC to a Mac
- From iTunes, go to Edit then to Preferences
- Click on the ‘Advanced’ tab, select the checkbox next to ‘Keep iTunes media folder organized’ then close the preferences
- Go to the File menu, then to Library and select ‘Organize Library’ (In iTunes 8 it’s Consolidate Library)
- Now you need to locate your iTunes library. Do this by navigating from the Edit menu to Preferences, and back to the “Advanced” tab
- You will see the iTunes library location specified here, now that all your music is consolidated you will want to move this folder to your Mac’s home Music directory
- Launch iTunes on the Mac, it may take a few moments while it gathers the new library information
If you have other music in your Macs iTunes directory be sure to back that up before copying over the files from the PC so you don’t accidentally overwrite any files.
Run Firefox in a protected sandbox
OS X has a built-in sandbox feature for applications, which can restrict their access to certain parts of the system. There isn’t a lot of documentation available on the sandboxing system, but I’ve successfully been able to sandbox Firefox. It has some limitations, but my plug-ins and add-ons work though yours may not.
If you have issues, you’ll have to search for the directories where your plug-ins are housed, and give read or read/write access permissions in the firefox-sandbox
file. There is only write permission to the ~/Downloads directory, so if you want to save files in a different location, you will have to change the firefox-sandbox
file or move them after the download has finished.
First, create the following file and save it somewhere as firefox-sandbox
:
;; http://codereview.chromium.org/379019/diff/1/2 (version 1) (deny default) (allow file-write* file-read-data file-read-metadata (regex "^/Users/user_name/Downloads") (regex "^/Users/user_name/Library/Application Support/Mozilla") (regex "^/Users/user_name/Library/Application Support/Firefox") (regex "^/Users/user_name/Library/Preferences") (regex "^/Users/user_name/Library/PreferencePanes") (regex "^/Users/user_name/Library/Caches/Firefox") (regex "^/Users/user_name/Library/Caches/TemporaryItems") (regex "^/Applications/Firefox.app") (regex "^(/private)?/tmp/")) (allow file-read-data file-read-metadata (regex "^/dev/autofs.*") (regex "^/Library/Preferences") (regex "^/Library/Internet Plug-Ins") (regex "^/Library/PreferencePanes") (regex "^/usr/share/icu") (regex "^/usr/share/locale") (regex "^/System/Library") (regex "^/Applications/Firefox.app") (regex "^/usr/lib") (regex "^/var") (regex #"Frameworks/SDL.framework") ; Our Module Directory Services cache (regex "^/private/var/tmp/mds/") (regex "^/private/var/tmp/mds/[0-9]+(/|$)") (regex "^/Users/user_name")) (allow mach* sysctl-read) (import "/usr/share/sandbox/bsd.sb") (deny file-write-data (regex #"^(/private)?/etc/localtime$" #"^/usr/share/nls/" #"^/usr/share/zoneinfo/")) (allow process-exec (regex "^/Applications/Firefox.app")) (allow network*)
Replace the /Applications/Firefox.app....
parts with the path to Firefox on your system. Also replace user_name
with your username. Next, open up a Terminal and execute this command:
sandbox-exec -f firefox-sandbox /Applications/Firefox.app/Contents/MacOS/firefox-bin
Make sure the firefox-sandbox
file is in the directory where you run the above command, and Firefox should launch in a protected sandbox.
Author: changcheh
Set photo titles to picture capture date in iPhoto
he titles iPhoto chooses for just-added photos is the annoying "IMG_nnnn" serial number from the camera. This AppleScript simply takes the date of the photo (EXIF info that iPhoto knows very well) and uses it as the photo title. The format is: yyyy-mm-dd-hh.mm.ss, so it’s a bit easier to read than the ISO version, but also easily sortable.
Here’s the code:
tell application "iPhoto" -- activate -- bring iPhoto back to front copy (my selected_images()) to these_images if these_images is {} then error "Please select some images before using this script." set thename to "" set thepaths to "" set thedates to "" repeat with i from 1 to the count of these_images set this_image to item i of these_images --set this_file to the image path of this_image set thename to thename & ", " & the title of this_image --set thepaths to thepaths & the image path of this_image & ", " set thedate to the date of this_image set theyear to the year of thedate set themonth to my format(the month of thedate as number) set theday to my format(the day of thedate) set theseconds to my format(the seconds of thedate) set themins to my format(the minutes of thedate) set thehours to my format(the hours of thedate) set thetitle to theyear & "-" & themonth & "-" & ¬ theday & "-" & thehours & "." & themins & "." & theseconds --set thedates to thedates & thetitle & ", " set the title of the item i of these_images to thetitle as string end repeat end tell on selected_images() tell application "iPhoto" try set these_items to the selection if the class of item 1 of these_items is album then error return these_items on error return {} end try end tell end selected_images on format(thenumber) if (thenumber as number) < 10 then set res to "0" & (thenumber as string) else set res to thenumber as string end if return res end format
Copy and paste the above in AppleScript Editor, and save it as a Script named 'Rename Photos' (or whatever) in /Library » Scripts » Applications » iPhoto (create any of those folders as required).
Make sure the AppleScript menu icon is visible (in AppleScript Editor’s prefs in 10.6; in AppleScript Utility in 10.5), then switch to iPhoto. Select some photos in iPhoto from the Events or Photos section, then select the saved script from the AppleScript menu and ... voila ... the photo titles will change to their respective capture dates.