ianneubert.com

How to sync music from iTunes on Mac to a PC

January 13th, 2011

Here is an rsync command that will synchronize music stored in a Mac to a PC. It will not sync Movies or TV Shows. Just remove the –excludes if you want to sync those things.

rsync -av --force --delete --stats --size-only -e ssh --exclude="ethumbs_vista.db" --exclude="Thumbs.db" --exclude=".DS_Store" --exclude="iTunes\ Library.xml" --exclude="Mobile\ Applications/*" --exclude="Movies/*" --exclude="TV\ Shows/*" ~/Music/iTunes/* /Volumes/itunes

Thanks to MacRumors for the base of this command.

Use SSH to get tail of log file

July 14th, 2010

Ever wanted to take the last 1000 lines of a log file from your remote server and then copy that to your local machine to use in a nicer text editor?

Now you can! This single command will grab the last X lines from a remote file, remove any ANSI color codes, and then compress the output right on to your local computer.

Just replace the green text with your information and you’re all set.

ssh username@my.server.com "tail -n 3000 /var/log/mylogfile.log | sed -r 's/\x1B\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g' | bzip2" > /my/local/file.log.bz2

The log will be trimmed, cleaned, and compressed all on the remote server before transport.

Ruby RVM Rocks!

April 23rd, 2010

I just now got around to installing RVM on my Mac. I wish I had done it a lot sooner!

RVM let’s you install multiple Ruby versions side by side. You can easily install a new ruby version just by typing:

rvm install ruby-1.8.7-p160

or

rvm install 1.9.2-preview1

And you can quickly switch between versions by typing this:

rvm ruby-1.8.7-p249

Note that you will need to install gems independantly in each of your ruby environments. But they make it easy with gemsets. Also note, that if you want to preserve your custom ENV settings on your Mac, you should place the bash source line into your .profile file and not to .bashrc as it notes.

Have fun!

Holy Optimizations Batman!

February 20th, 2010

I previously published a Ruby script that essentially duplicates an Amazon S3 bucket. I use it to copy my production bucket into a testing bucket that I can then use in my staging environment, without fear of killing off something important.

Hydra, the multithreaded fire breather
Hydra, the multithreaded fire breather

Anyway, this script used to take around 18 minutes to complete a full copy of a bucket with about 2,000 keys. What a pain when I had to run this script multiple times for some testing!

So I finally got around to rewriting it today, and wow, what an improvement!

I upgraded the delete and copy operations to run multithreaded, and boy does it fly.

On my main bucket (with about 2,000 keys) it now only takes about 1.5 minutes to complete! That’s 12x faster than it used to be!

So if you are looking for a multithreaded Amazon S3 bucket copier or duplicator, check it out!

New rubygem: ianneub-right_aws

April 7th, 2009

Continuing my new trend of publishing code that I use, I’ve released a new fork of RightScale’s right_aws ruby gem. This gem makes accessing Amazon’s S3, EC2, and other web services a piece of cake through ruby.

One problem with (at least) the latest release of right_aws is that it tries to connect to the Amazon API at the bucket_name.s3.amazonaws.com. This causes the connections to the API to thrash when you are working with more than one bucket. I’ve taken out the code that makes that connection so that it will now only connect to s3.amazonaws.com/bucket_name by default.

You can find the code on GitHub. And see extra documentaion here.

Microsoft / Xbox Live customer service call

March 3rd, 2009

I just had a funny call to Microsoft, well to Xbox.com support, that really just gives some insight into what Microsoft culture is like.

So what I want to do is stop having them automatically renew my credit card for Xbox Live Gold Service ($49.99/yr). I go to their website and poke around the account settings page, and come to find out that I can’t do that online, I have to call and talk to someone. Fine.

I call Xbox Live at 800-469-9269 and go their voice menu prompt system and choose the “Accounts & Billing” -> “Other account questions”. Apparently I went to the wrong place. After explaining what I wanted to do the CSR said I had to be transfered, I guess I am cancelling my subscription, instead of just turning off auto renew.

The first problem started here, it wasn’t too obvious where I needed to go in their menu system. The second problem was immeadate: the CSR asked me to verify my account information, screen name, email, address, phone, last 4 digits on my credit card.

He then transfers me to the billing who procedes to ask me the same questions again… waste of time there. Starting to get annoyed.

Now after I explain again that I want to stop the auto billing “feature”, he asks me if he can give me some Microsoft points to keep my subscription. Further annoyed.

I say no, that I don’t want to have my card auto billed. So he asks me why I want to stop the auto renewal, and I reply that its more than $20 cheaper to buy the Xbox Live Gold Cards then to have them auto charge my card.

So he suggests that I reduce my plan to the $7.99/mo plan because it is less expensive. Ugh! I just want to stop the dang auto renewal. So by this point I’m over it, I ask him to just remove my auto renew plan and be done with it.

About time. By the way, that wasted 15 minutes of time. Add another 10 minutes for this rant.

Thank you Microsoft! If that had been Apple or some other customer focused company I could have done the whole thing online in 30  seconds.

S3 Ruby Tools

February 3rd, 2009

I just published some more code on github today. This new repo contains some ruby code that I use to manipulate my Amazon S3 buckets.

Right now there are just two simple scripts, one deletes a whole bucket, the other copies everything from one bucket to another, with an optional prefix to limit what is copied.

I’ve been using these scripts for a few months now, they are very stable and do some basic error handling.

Here is the README file.AWS Logo

My message to President Obama

January 23rd, 2009

Not that it will do anything, but I’m learning that you can’t just sit on the sidelines…

I think that it is extremely wrong to support those groups supporting abortion with my taxpayer money. I am strongly opposed to abortion as it is the destruction of potential human life. I do not want my money wasted on groups or organizations that will suggest, tolerate, or engage in this disregard for human life.

Leap Second!

December 31st, 2008

In case you missed the leap second today, here is a YouTube video from the Eastern Time Zone:

Here are some links to more info about leap seconds:

New Xbox 360 Experience mini-review

November 20th, 2008

The new Xbox 360 Experience was released yesterday and I got to spend a little bit of time playing with it. Overall I think the new look is OK, but it seems harder to get to important things like the DVD tray and XBL profile information. In place of that easy access are a bunch of ads trying to peddle marketplace wares. Pretty crappy trade off.

Don’t get me started about how lame the new avatar system is either. In a blatant ripoff of the Wii’s Mii feature, the 360 now makes us setup an avatar to be associated with our XBL account. If I wanted to play a cutesie, made-for-4th-graders console I’d had bought a Wii already.

IANsters Xbox 360 avatar

IANster's Xbox 360 avatar

The only thing that saves the new Xbox 360 Experience from being a total waste is that we can now stream Netflix Watch Instantly content to our 360. I tested this with a couple of different shows and had mixed results. First I watched the movie Enchanted, and was disappointed to see that it was presented in 4:3 Full Screen mode, and was only in 2 channel stereo. Yuck. The second title I watched was the first episode of Jericho. Thankfully this was at least in wide screen, but again it was only in 2 channel stereo. Both titles were noticeably compressed and looked worse than even watching them on a bad satellite TV channel.

While this probably isn’t the fault of the Xbox 360 or Microsoft, it still isn’t the best experience, and I doubt that I will be paying for XBL Gold Membership if this is the only feature worth using and it remains half-baked.

UPDATE: Here is more info on the Netflix stream encoding process.