08.29.08
Posted in Miscellaneous at 2:58 pm by sam
Shannon and I are audiobook fiends. We listen to them when we’re driving, lifting weights, working on the house, doing laundry, mowing the lawn, or doing just about any activity that doesn’t require intense mental focus. They provide true multi-tasking, effectively turning our brains into dual core processors (whoa! …geeking out again…I’ll try to keep that in check). Back when I worked in an office and had to sit in freeway traffic for an hour or two every day on the way to and from work audiobooks cured my road rage. “Sure, feel free to cut me off; I’m reading a good book! What do I care?”
The public libraries are chock full of fantastic audiobooks on CD, but getting them into iTunes in a usable format is not super-intuitive. Here’s a step-by-step guide to help you out…learned and tweaked over the last 3 years of my audiobook ripping experience. This is going to seem like a lot of work at first, but it becomes second-nature and you’ll eventually be able to do it all very quickly. You’ll even be able to handle those 47 disc James Michener and George R.R. Martin books with ease.
1. Insert the first disc. iTunes will get the book titles and track names for you from the tubez, but there’s a good chance that they’ll be mis-spelled or not quite configured the way you want them. You don’t care about the track names, but you will want the book titles to be correct.
2. Select the all of the tracks and ctrl-click (right-click) –> Get Info.
3. Fill out the info dialog with the following:
Artist: the author’s name
Album: the book title — delete any disc info such as “disc 1″ or “1 of 6″
Composer: the reader’s name
Genre: Books and Spoken
Remember Position: Yes
Skip when shuffling: Yes
Disc Numbers: make sure that the disc numbers are correct

4. Click OK to dismiss the info dialog. With the tracks all still selected click Advanced–>Join CD Tracks. This rips the whole disc into iTunes as a single track. Yes, this is what you want. Audiobooks will remember your playback position automatically, so there’s no reason to get more fine-grained than per disc.
5. Bring up the iTunes Preferences dialog and go to the Advanced tab. Then click the Importing sub-tab.
Update for iTunes 8: The Importing dialog is now accessed on the General tab of the preferences dialog by clicking the “Import Settings…” button.
6. Change the Setting dropdown to “Custom…” and fill out the dialog that pops up as follows:

7. Whether you use error correction is up to you. It takes longer to rip with error correction turned on, but it can help smooth out scratched CDs. Your Importing preferences should now look like this:

8. Click OK to dismiss the prefs dialog, then click the “Import CD” button in the bottom right.

9. The track for first disc should now be showing up under Music in your iTunes library. At this point, I like to change the name of the track to include a disc number. So for the example I’ve been using so far, I changed the track name from “Predictably Irrational” to “Predictably Irrational 01/06″.

10. Repeat Steps 1-9 for each disc in the book.
11. Now we need to change the file extensions so that the book will show up under the Audiobooks menu instead of the Music menu. Select one of the tracks and ctrl-click–>Show In Finder (or “Show In Windows Explorer for non-Mac peeps).
12. Delete the audiobook from iTunes, but make sure to keep the files — DO NOT select “Move to Trash”!

13. Go to the Finder (or Windows Explorer) window that you opened on Step 11. You should see all of the files for your audiobook there. They all end with the files extension “.m4a”.
14. Change the file extensions to “.m4b” (Soon I will write a little unix shell script to do this for you automatically and will post it here, but for now you’ve got to do them one at a time.)
15. Back in iTunes, go to File–>Add to Library…
16. Select the folder containing your m4b files (probably iTunes–>iTunes Music–>author name–>book_title) and click Open.
17. That’s it. The audiobook should now show up under Audiobooks in iTunes and be ready to copy to your iPod.
One more tip: During playback on your iPod, if you just select a track and play it the iPod will stop playback when it reaches the end of that track. However, if you start playback on the track before the one that you want to listen to and skip forward, then the iPod will continue on to the next track each time it finishes a track.
Permalink
08.28.08
Posted in Uncategorized at 9:36 am by Shannon
Our neighborhood, Irvington, is wonderful and we love it. But the truth is, outside of our cozy little block of historic two-bedroom bungalows, the east side of Indy is littered with payday loan stores. These are only outnumbered by gas stations, pawn shops, and rent-to-own furniture stores. Every day, I drive by a cash advance store, and this morning I noticed something quite phenomenal for sale. Identity theft! For only $9.95, you too can be the proud owner (purchaser?) of identity theft! Don’t believe me? Check it out:


Boy, was I excited to see this! Like everyone else, I am pretty scared of identity theft. The news anchors are always tipping us off to clever new scams designed to pull the wool over the unsavvy consumer’s eyes, and I probably receive about 2 emails per week warning me against predators trying to steal my identity. And as if the online opportunities for thieves are not enough, less technically advanced criminals are now just breaking into homes. Instead of looking for jewelry in the bedroom or expensive lawn equipment in the garage, they now look for computers and documents. My neighbors suffered a burglary a few months ago. The perps swiped a new laptop, birth certificates, passports, social security cards, and of course credit card and bank statements! Not good.
So you can imagine my surprise when I realized that for the low price of $9.95, I can…well, I can actually buy…identity theft! There’s no better way to protect yourself from something scary than to just buy it outright! I mean, when big corporations are afraid of another organization’s success in the same field, the solution is obvious to the CEO, CFO, COO, and of course the board of directors. To get rid of the competition, just buy them out! Merger is a six-letter word, but necessarily a dirty one…as long as you are at the top of the food chain, of course. Middle managers break out in a cold sweat after hearing the word “merger” whispered at the company picnic, but shareholders are on the phone to Miles, their real estate broker, seeking a posh house in the Hamptons to celebrate the inevitable growth of their already pregnant investment portfolios.
Yes, buying something makes it yours. And when it’s yours, it’s not scary anymore. If you owned the mafia, they would have to do what you told them. Guido would be at your beck-and-call. And Guido isn’t that scary anymore when he’s picking up your dry cleaning and driving to the post office to drop off all of those mysterious packages you’re always sending to “the boys” in Chicago, NYC, and Miami.
I debated whether it would be wise for me to tell the world about this amazing opportunity to purchase–and be master of–identity theft. I mean, if you all go out and buy it first, where does that leave me? But, geography is on my side. There are two people who might actually read this blog post, and unfortunately for them, I live closer to the store. Iron-clad identity is only a purchase away. Don’t hate me because I beat you to the punch, ya’ll!
Permalink
08.22.08
Posted in Miscellaneous at 8:11 am by Shannon
Date: August 21, 2008
Time: 6:50 am
Setting: YMCA. Shannon climbs onto the treadmill for another hateful, grueling 30 minutes of her life. Next to her is an older man keeping up a steady pace on his treadmill. Every now and then, a bead of sweat drips off of his nose and splashes on to the base of the machine. He looks down and doesn’t speak for a few minutes…but then he does speak to another older gentleman sitting quietly on a nearby crunch machine. The place is full of over-60′s this early in the morning.
Older man to his buddy: This lady next to me is burning up her machine, and I don’t even know what her name is! Yeah, she’s over there makin’ me look real bad, and I don’t even know her name!
Shannon (panting): I’m Shannon. And you are?
Older man: Bruce. Good to meet ya! Are you doing fat burner, level 14?
The man on the crunch machine snorts loudly. Bruce looks at him accusingly and continues.
Bruce: I’m right, aren’t I? Fat burner–I can hear the machine getting louder and louder, then more quiet. That’s the fat burner, isn’t it!?
Shannon: You’re right. (He really was!) You?
Bruce: Level 9, constant. This here’s Fred, but everybody calls him Beautiful (gestures to his buddy on the crunch machine).
Shannon: Hi, Beautiful.
All the other old men in the area giggle, and Beautiful turns an adorable shade of red.
Beautiful: Well, he’s Bruce, so everybody calls him Bruce the Moose!
More laughter from the elderlies. The other older women in the room giggle especially loudly. I start to think that maybe Bruce the Moose and Beautiful are some of the “cool kids.”
Bruce the Moose (looks over at me appraisingly): So, you run marathons, don’t ya? You look like you’re runnin’ marathons.
Shannon: No, no, not me. I am thinking about trying to do the Mini next year, but I have never run more than 6 miles at one time. Are you a runner, Bruce the Moose?
Beautiful laughs and shakes his head back and forth. Bruce grins from ear to ear.
Bruce the Moose: Used to be. I’m too old now–it’s tough on the joints, ya know. That’s why I do the stairmaster. Keeps me fit without stressin’ my knees and ankles. (Gives me another sidelong glance.) So, you about 30?
Shannon: Yep, that’s right. (Again, dead on. This guy is good!)
Bruce: I see you got a ring on–you married?
Shannon: Sure am. My husband comes here a lot, too–his name is Sam. You’ve probably seen him around.
Beautiful: Don’t ask him his age, honey! He could be your great-grandpa! You might fall off the machine after you hear it!
More giggles from the peanut gallery.
Bruce the Moose: It’s Lisa, right?
Shannon: No, it’s Shannon.
Bruce the Moose: Right, Shannon. Shannon. I’ll remember that. It’s Irish. I’ll remember that.
I am unable to speak for a while, and Bruce the Moose hears my labored breathing and takes pity on me with his silence. When my workout is over, I clean off my machine.
Shannon: Well, Bruce, it was really nice to meet you. Are you almost done? You’ve been going for a long time!
Bruce the Moose: Yeah, just a few more minutes here. I do five miles every other day. Keeps me spry.
A couple gray-haired ladies in the room look at him with affection. Another lady walks by–probably about 40.
Bruce the Moose (to the 40-year-old): Hi, young lady.
40-Year-Old: Hi, Bruce.
Bruce the Moose (to me): It’s Michelle, right?
Shannon: Nope, it’s Shannon. Irish, remember?
Bruce: Yeah, okay–Shannon. I’ll remember that.
Shannon: Okay, Bruce. Have a good day–I’ll see you later.
The 40-year-old lady hops on a treadmill and starts laughing and shaking her head at Bruce. Beautiful joins in.
Bruce the Moose: What? What’s so funny?!
40-Year-Old: It’s been 5 years and you still don’t get my name right, Bruce! I don’t think you’ll be remembering hers anytime soon.
Beautiful is laughing like crazy now, as are the rest of the elderlies. Bruce quiets the peanut gallery with a hand, shushing them like a classroom of second-graders. He looks at me confidently.
Bruce the Moose: Bye, Rachel!
Everyone else: (raucous laughter)
Shannon: Bye, Bruce.
Permalink
08.07.08
Posted in Software Development at 4:21 pm by sam
Close on the heels of my last post, here’s a little pre-commit script to help integrate Redmine issues with svn commits. The basic idea is that you can’t commit code to the repository without referencing a Redmine ticket. I searched the tubez for quite a while looking for something else like this. I found this forum post, but it had a bunch of shell syntax that didn’t work for me on Dreamhost.
I hereby disclaim that this was a quick hack for me and understand that there is probably a better way to do this. If, however, you’re not passionate about this sort of thing and just want something that works, it’ll do.
I’ve actually got 2 scripts for ya:
The SVN Hook
Copy and paste this first one into a file named ‘pre-commit’ (no file extension), and drop it into the hooks directory of your svn installation. This script will be called automatically by svn whenever someone tries to commit. All it really does is pass the submitted comment string on to our ruby script, featured below.
#!/bin/bash
REPOS="$1"
TXN="$2"
SVNLOOK=/usr/bin/svnlook
# change to the current working directory
cd `dirname $0`
# svnlook at the comments being submitted with the commit request
COMMENTS=$($SVNLOOK log -t "$TXN" "$REPOS")
# Holla out to a little ruby pre-commit script. if it fails, exit with a return
# code of 1, which means that errors occurred
/usr/bin/env ruby pre-commit.rb "$COMMENTS" || exit 1
A Ruby pre-commit script (pre-commit.rb)
Copy the following code and paste it into a file named ‘pre-commit.rb’. Drop the file into your svn/hooks directory alongside the pre-commit script created above.
#!/usr/bin/env ruby
comments = ARGV[0]
if /[a-zA-Z0-9]/ !~ comments
raise "You must include a comment with your commit."
end
if /refs|fixes|closes\s#([0-9]+)/ !~ comments
raise "You must reference a Redmine issue in your commit comments (e.g. 'refs #1234')."
end
issue_number = comments[/#([0-9]+)/][/([0-9]+)/]
# Change the username, password, hostname, and dbname in the following line
# to match your settings
command_line_output = `/usr/bin/mysql -N -u your_mysql_username -pyour_password \
-h mysql.yourhostname.com your_redmine_dbname -e \
"SELECT COUNT(*) FROM issues I INNER JOIN issue_statuses S \
ON S.id = I.status_id WHERE S.is_closed = 0 AND I.id = #{issue_number};"`
redmine_issue_open = command_line_output[0,1]
if '0' == redmine_issue_open
raise "Issue ##{issue_number} is not in an open state."
end
Whew! That’s 2 techie posts in a row! I’ll try to come up with something more fun for everyone next time.
Permalink
08.05.08
Posted in Software Development at 11:23 am by sam
I recently switched a couple of side projects I had hosted with Dreamhost from Trac to Redmine. The process was surprisingly easy.
Even though the actual migration was easy, it took me a long time (almost longer than my patience would tolerate) to find the command that would do the import of wiki data, tickets, milestones, etc. In an effort to pull another soul out of the time suck that is ‘googling for a quick how-to’, here’s a quick how-to:
I use Dreamhost, but these commands should be adaptable to any hosting environment with an ssh terminal.
$cd your.redmine.subdomain
$rake redmine:migrate_from_trac RAILS_ENV="production"
Trac directory []: /home/.orchid/path/to/your/trac_site
Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]: mysql
Trac database host [localhost]: mysql.your_hostname.com
Trac database port [3306]:
Trac database name []: trac_db
Trac database schema [public]:
Trac database username []: trac_db_username
Trac database password []: trac_db_password
Trac database encoding [UTF-8]: latin1
Target project identifier []: redmine-project-id
This project already exists in your Redmine database.
Are you sure you want to append data to this project ? [Y/n] y
Migrating components....
Migrating milestones..
Migrating custom fields
Migrating tickets........
Migrating wiki........................
Components: 4/4
Milestones: 2/2
Tickets: 8/8
Ticket files: 0/0
Custom values: 0/0
Wiki edits: 24/24
Wiki files: 1/1
The import works pretty well. The only big thing I noticed missing so far is “reply-formatted” text in the wiki page:
> wiki text that begins with a greater-than sign to indicate e-mail
> replies did not get imported.
Hope it’s helpful!
Permalink