Mark's Blog About Search Activity

TIL how to customize an icon for a folder in OS X

I recently downloaded a number of ebooks that to my desktop and threw them all in a folder ‘books’. I wondered how hard it would be customize the icon. Turns out it is super simple.

  1. Copy image (using preview)

  2. Open folder’s info, click on image at the top of the info view and select Edit -> Paste.

Screen Shot 2014-01-08 at 9.21.03 AM

Source: http://support.apple.com/kb/PH10847

Transfer iBook to Nook

Both of my daughters have Nooks and we wanted to see if it were possible to transfer books downloaded from iBook to the Nook. I found a few old articles, but the most recent information I found for Mavericks was here http://ebookconverter.blogspot.com/2013/11/where-to-find-epub-file-in-ibooks-for.html. The salient points:

  1. books are under ~/Library/Containers/com.apple.BKAgentService/Data/Documents/iBooks/Books

  2. epub folder can be converted to a epub file by zipping up the contents and changing the extension from zip to epub. Don’t zip up the folder; e.g.  ”43345345.epub”,  rather, open that folder and select all the files and compress those.

Ripping DVDs

Over Christmas break I wanted to rip some DVDs I received so I can stream to my xbox. Previously I would use DVDFab to decrypt DVDs to VOB and then Auto Gordian Knot (AutoGK) to transcode the VOB to AVI. The entire process took quite a while for each DVD. To mitigate the time involved, I would decode all the VOBs and then queue up many transcode jobs w/ AutoGK and let it run overnight. Nice, but slow.

I found a better way. I used MakeMKV, which support both windows and mac, to decode and create a MKV from a DVD. This took maybe 10 minutes for a DVD. Xbox/windows media center won’t play MKV directly, so I still needed to transcode. Here I used ffmpeg to transcode video from mpeg2 to mpeg4 and audio from either pcm or aac to mp3 with:

ffmpeg -i "input.mkv" -f avi -c:v mpeg4 -b:v 4000k -c:a libmp3lame -b:a 320k "converted.avi"

or in a batch (windows)

for %a in (*.mkv) do ffmpeg -i "%~na.mkv" -f avi -c:v mpeg4 -b:v 4000k -c:a libmp3lame -b:a 320k "%~na.avi"

Note: To just change container; e.g. mkv to mp4:

ffmpeg -i "input.mkv" -vcodec copy -acodec copy "output.mp4"

Note: Some posts indicate using “-absf aac_adtstoasc” also.

Found from http://superuser.com/questions/227338/how-to-convert-an-mkv-to-avi-with-minimal-loss/467980#467980

Git cherry pick from remote branch

I wanted to pull in a specific PR from a repo that is no longer maintained into my fork.

Local repo is KonaTeam/ri_cal and PR was https://github.com/dustacio/ri_cal/.

` $ git remote add dustacio https://github.com/dustacio/ri_cal/ $ git fetch dustacio $ git cherry-pick -c c25430e3defbf1005 $ # resolve any conflicts and commit `

source: http://www.miek.nl/blog/archives/2011/12/13/cherry-picking_remote_branches/index.html

How to change default printer settings OS X

Just open  http://localhost:631/printers

It’s all detailed here:

http://lavagoat.wordpress.com/2011/03/23/change-default-printer-settings-on-mac-os-x/