Category: Howto

Fixing iTunes Match on iPhone and iPad

A couple weeks ago, I noticed that iTunes Match wasn’t working properly on my phone. I could play music if I downloaded it, but I couldn’t get most of the songs to stream. It would immediately start going through the list of items pausing for less than half of a second on each one before moving on. Eventually it would hit a song it liked and it would wait long enough to stream the beginning and start playing. The only way I found to fix it was to turn off iTunes Match, delete all the music stored on my device, perform a hard reset, and then turn on iTunes Match again. I did this on two devices without restarting the phone and it did not help anything. Here are the steps in iOS 8.2:

  1. Open the Settings app.
  2. Navigate to Music.
  3. Scroll to the bottom of the list to iTunes Match.
  4. Tap the toggle switch to deactivate iTunes Match.
  5. Navigate back to Settings.
  6. Navigate to General > Usage > Manage Storage and wait for the list of apps to load.
  7. When it appears in the list, tap Music.
  8. Tap Edit and red circles will appear next to the items.
  9. Tap the red circle next to All Music and tap Delete.
  10. Wait for the music to be deleted from your device.
  11. Perform a hard reset by holding the home button and the lock button down simultaneously for about 5 seconds until the screen turns black and the goes to the Apple logo screen.
  12. If the device turns off at this point, hold down the lock button to turn the device back on.
  13. After the device finishes loading, unlock the device and navigate to the Home screen.
  14. Open the Settings app.
  15. Navigate to Music.
  16. Scroll to the bottom of the list to iTunes Match.
  17. Tap the toggle switch to activate iTunes Match.
  18. Press the Home button.
  19. Open the Music app.
  20. Wait for iTunes Match to resynchronize your music.
  21. Play some songs to make sure that it worked.

I hope this helps you if you are having issues with iTunes Match on your iOS device. I will report back here if I find that it’s stopped working again.

Microsoft SQL Server Installation Issue Fix

I was installing Microsoft SQL Server 2012 on a development server and kept getting an annoying error message:

Microsoft SQL Server 2012 Install Error Message

The following error has occurred:

An error occurred during the installation of assembly ‘Microsoft.VC80.MFC,version=”8.0.50727.4053″,publicKeyToken=”1fc8b3b9a1e18e3b”,processorArchitecture=”x86″,type=”win32″‘. Please refer to Help and Support for more information. HRESULT: 0x800736CC.

For help, click:

KB Article 2688946 describes a very similar issue. I eventually found a fix in the form of Cumulative Update 2 (KB2703275) Here is what you need to do to fix it:

  1. Completely close the SQL 2012 installer (it might just crash and close itself).
  2. Use Control Panel to uninstall Microsoft Visual C++ 2010 x64 Redistributable and Microsoft Visual C++ 2010 x86 Redistributable.
  3. Download Cumulative Update 2 from (449398_intl_x64_zip.exe)
  4. Create C:\Updates
  5. Extract 449398_intl_x64_zip.exe to C:\Updates to get SQLServer2012-KB2703275-x64.exe
  6. Run the Installer again from the command line with the following (all on one line):
    setup.exe /Action=Install /UpdateEnabled=True /UpdateSource="C:\Updates"
  7. Install as usual and the issue goes away.

Let me know if this worked for you by leaving a comment. I’m curious to know how widespread this issue is.

Quick File Sharing for Linux and Mac OS X

This is a great little trick to quickly make a directory of files accessible to anyone. You can do it in any OS that has Python installed, which most Linux distros and Mac OS X do. Windows does not have python installed by default, but the same thing should work from there if python is installed.

First, open the terminal and navigate to the directory you want to share. While in that directory type the following command:

python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"

This will start a web server on port 8000. This is a very simple and quick way to share a file over the network. Just send a link to the IP address of the machine.

If you are behind a NAT router or firewall, port 8000 needs to be forwarded or opened, but if you are on the same network all you need to do is send them a link to http://<your_ip_address>:8000 and they can easily browse the directory you ran the command from and download any file there. When you’re finished, go back to the terminal and use Ctrl+C to end the process.

Accessing Mac OS X Leopard Grayed-out Preference Panes

UPDATE: This also works on Snow Leopard if you are having the same problem accsessing any preference panes.

I have a work-issued MacBook Pro with Leopard, specifically Mac OS X 10.5.8, installed. It is a test image that was installed to test ideas about ways to administer systems for users without Administrative rights. At the end of the test, my access was changed to grant my user administrative rights on the laptop, but it still has many problems. I am waiting for the new Snow Leopard image to be completed to have my laptop reimaged. In the mean time, I have been struggling with a few issues.

The system blocks access to certain preference panes in System Preferences. This was probably an oversight or the leftovers of some experiment, because it does not block access to some of the more sensitive preferences. I can add new users to the laptop and do all sorts of things that I should probably not do on the network. The preferences I could not access were not too important for me to change, like Growl, for instance. Then I tried to use Apple’s Magic Mouse. When I installed the system update that enables its advanced features, I could not access the new Mouse preference pane. When I hover over it, the tooltip says “Your access to this preference has been restricted.” If you try to open the pane directly the error says “You cannot open “[name of preference pane]” preferences pane because it is not available to you at this time. You might need to connect a device to your computer to see this preferences pane.” It looks like this:

Here’s how you do it:

  1. Open the Applications folder and find the System file.
  2. Right click or Command-click System and choose Create Duplicate.
  3. Right click or Command-click the new System Preferences and choose Show Package Contents.
  4. Navigate to Contents > Resources and find the NSPrefPaneGroups.xml file.
  5. Move NSPrefPaneGroups.xml to the Trash.
  6. Make sure System Preferences is not running and double click System Preferences to run it. All the preference panes appear to be gone!
  7. In the System Preferences application click the View menu at the top of the screen. All the preference panes are now accessible from the View menu.
  8. When you have changed the preferences you need to change, close System Preferences.

Any time you need to access the disabled system preferences, just use System Preferences, otherwise you can still use the original System for changing system preferences normally.

So, You Want to Learn a Language?

You can learn (but not master) any language in one hour or less. Don’t believe me? Well, that’s what Tim Ferriss says. He says most language learners neglect the most critical first step in learning a new language: deconstruction. He claims that the fastest language learners deconstruct the language they want to learn before they start memorizing lists of vocab words. His reasoning is that for native speakers of a particular language to learn some languages might be very easy, while others might be nearly impossible.

I took an intro to Linguistics course in Southern California and the instructor also happened to teach English as a Second Language (ESL) classes. Most of his students were Japanese students who wanted to learn English, so they enrolled in student exchange programs. My Linguistics instructor and Ferriss both point out that Japanese and Mexican Spanish have very similar sets of sounds (phonemes) in their languages. Many students would become frustrated learning English and wound up learning Spanish from other students at the college.

Treat Language like a sport. If you are very short, you might have more work to do to be a successful basketball player. The same holds for languages that are very different from those you already speak. Learn how to deconstruct a language first so you know what you’re getting yourself into.

Searching a Freecycle Mailing List with Gmail

I subscribe to the local freecycle mailing list and have filters set up in Gmail to label all freecycle mail and have it get archived automatically so it doesn’t clutter up my inbox. I don’t check it every day, so I just want to see what’s available right now. Sometimes I also have a specific thing I’m looking for. To help look for these things, I use the following search string in Gmail.

label:freecycle subject:offer subject:-wanted subject:-want subject:-needed subject:-need subject:-taken

You can also add subject:bike and it will only return results that have the word bike in the subject line. This assumes that the label you are using for all of the freecycle messages is freecycle.

Record Streaming Audio with Linux: Part I

Update: For a better solution check out this newer post

I happen to enjoy listening to Glenn Beck. The problem is that I can’t receive his weekday shows where I live. Even if I could receive his weekday show over the air, I wouldn’t hear most of it because I am busy working all day.

The solution: cron and mplayer with a little help from sox.

Here’s a sample script:

# Use mplayer to capture the stream
# at $STREAM to the file $FILE

DATE=`date +%d-%b-%Y` # Save the date as DD-Mmm-YYYY
YEAR=`date +%Y` # Save just the year as YYYY

# Where you want the file saved. Leave off file extension

# The following file should be a playlist file such as .asf or .asx
# You can also create your own file with a URI and put it here
DURATION=3.1h # enough to catch the show, plus a bit
#DURATION=200s # a quick run, just for testing

# For the id3v2 Tags
AUTHOR="Glenn Beck"
ALBUM="104.7 WPGB-FM Pittsburgh"
TITLE="Glenn Beck Show - $DATE"

# Capture Stream
/usr/bin/mplayer -really-quiet -cache 500 \
-ao pcm:file="$FILE.wav" -vc dummy -vo null \
-playlist $STREAM &
# the & turns the capture into a background job
sleep $DURATION # wait for the show to be over
kill $! # kill the stream capture

# remove gaps and convert to mono
sox $FILE.wav -c 1 $FILE-silenced.wav \
silence 1 -0.9 2% -1 -0.9 2% ;
rm $FILE.wav ; #remove original capture

# Encode to .mp3, mono 32kHz 32kb/s, and tag the file
lame -a -m m --tt "$TITLE" --ta "$AUTHOR" \
--tl "$ALBUM" --ty "$YEAR" --vbr-new -V 9 \
--resample 32 $FILE-silenced.wav $FILE.mp3 ;
rm $FILE-silenced.wav # Remove the raw audio data file

Once all of the variables have been set, make this executable and make a cron job for it.
crontab -e

Here’s an example for starting at 6am every weekday:
0 6 * * 1-5 /home/shawn/bin/ >& /dev/null


  • The basis for this script is the one found at this Linux Journal article.
  • You need at least SoX version 12.17.9 for the silence filter to work properly.
  • MPlayer should be fairly recent. Older versions have a different syntax for pcm (wav) audio output
  • This solution still requires huge amounts of disk space (~500MB/hour). I am still experimenting with using named pipes (fifos) to do all of the file processing in RAM and only output the final encoded file to the disk.