Saturday, December 15, 2012

Introducing oreilly-downloader

December 15, 2012 Posted by Jason Irwin , No comments
This week I created a Ruby script to facilitate downloading purchased video content from O’Reilly. I love O’Reilly’s products, especially their videos, but the need to download each video file individually, while understandable, is very frustrating and time consuming (note: it is possible to stream videos, but I like to watch my purchases while on the go when I typically don’t have an internet connection)
The code is pretty simple – using the mechanize gem to log into the site (after requesting credentials), and loop through the pages of video product purchases, downloading each mp4 file that doesn’t exist locally (complete with loading status via the mechanize-progressbar gem!).
Here’s the link:
https://github.com/irwinj/oreilly-downloader
If any O’Reilly folks are reading and have any questions or concerns, please drop me a line!

Wednesday, December 12, 2012

Post RVM install issues on Mac OS Mountain Lion

December 12, 2012 Posted by Jason Irwin No comments

Tonight I installed RVM on my MacBook Pro in order to use multiple versions of Ruby side by side. I ran into a number of issues:

Issue 1: Failed to build gem native extension

After installing RVM and ruby 1.9.4 I needed to install some gems but running the gem installer resulted in the following error:

ERROR:  Error installing mechanize:
ERROR: Failed to build gem native extension

The solution:


Download and install the gcc installer for Mac OS from here:


https://github.com/kennethreitz/osx-gcc-installer


The source:


This tip came courtesy of Alex Zak on stackoverflow. It looks like gcc used to come bundled in XCode’s command line tools but no longer does.


http://stackoverflow.com/questions/9552292/failed-to-build-gem-native-extension


 


Issue 2: Gems I installed were not visible


This time the gem install worked and I didn’t receive the above error message. However, when I attempted to run my application the require statement failed and executing gem list did not show my gems.


The solution:


Running the following command fixed my issues:



rvm use ruby-1.9.3-p125 --default


 


The source:


The resolution came from pcragone on stackoverflow


http://stackoverflow.com/questions/9622467/after-installing-ruby-gems-running-the-new-gem-returns-could-not-find-errors


 


Issue 3: OpenSSL certificate verify failed


Running an application that previously worked I received the following error:



OpenSSL certificate verify failed


The solution:


I’ve seen this on Windows before but never on my Mac. Because I’m using RVM, the solution was pretty straightforward, using the following commands to fix the issue:


$ rvm remove 1.9.3 (or whatever version of ruby you are using)
$ rvm pkg install openssl
$ rvm install 1.9.3 --with-openssl-dir=$rvm_path/usr

The source:


The railsapp blog on github has a nice writeup on this


http://railsapps.github.com/openssl-certificate-verify-failed.html


 


The End


I hope this helps someone as the original sources helped me tonight!

Sunday, December 9, 2012

Review - Velocity Conference

December 09, 2012 Posted by Jason Irwin 1 comment

Disclosure: I received a review copy of this title from O’Reilly

Velocity Conference 2012: Complete Video Compilation

Recently I wrote a review of O'Reilly's Fluent Conference video compilation. I gave the set a gushing review and enjoyed the content so much that I decided to review the 2012 Velocity Conference set. I wasn't disappointed.

For those who don't know, Velocity is O'Reilly's Web Performance and Operations conference. Similar to O'Reilly's other conferences Velocity brings together experts from many prevalent technology companies - including Google, Amazon, Facebook, Twitter and Walmart, to name but a few. The conference was split into four tracks: Web Performance, Operations, Velocity Culture and Mobile Performance and focuses a lot of attention on web metrics and large scale web performance. The set weighs in at a whopping 54.5 hours for $400 (at time of writing). As with previous O'Reilly content that I have reviewed, the production quality of this set is amazing. Video is high definition, sound is crystal clear and while the set may seem pricey at first, the video set is a very viable alternative to attending the conference in person. Given the impact of performance on both user engagement and conversion optimization this set is invaluable to anyone building or maintaining a commercial web application.

I still have a bunch left to watch - the set includes 100 videos! - but so far some of my favorite talks have been:

A Web Perf Dashboard: Up & Running in 90 Minutes by Aaron Kulick and Cliff Crocker

In this two part session Aaron Kulick (of the Walmart operations team) and Cliff Crocker (formerly of the same team) detail the steps required to build a performance dashboard using piwik, boomerang.js, webpagetest, graphite and a host of other open source technologies. It's a very interesting talk with the speakers explaining the rationale and gotchas when building an operations dashboard including lessons learned when working on Walmart's large scale web properties. It is also exciting to see a talk where the end result is a usable product in the form of a VM containing the dashboard created during the talks (though I have yet to find the link for said VM).

Building for a Billion Users by Jay Parikh

It is always fascinating to gain insight into the tools and techniques leveraged by software behemoths. In this presentation Facebook engineering VP Jay Parikh gives a great overview of Facebook's systems and processes focusing both on performance and operations concerns. Seeing the tools and techniques that Facebook uses to scale to billions of users is riveting and I look forward to doing some research into some open sourced tools such as phabricator that I hadn't previously heard of.

Investigating Anomolies by John Rauser

In this talk John Rauser of Amazon uses the London Cholera Epidemic of 1854 to illustrate the need to use data analysis (including high level statistical summaries, distribution of data and raw logs) to explain anomalies in software systems and thus make systems more bulletproof. This is a much less technical presentation than the others in the series, but the content was extremely interesting and an imaginative way to instill the need to research and identify system anomalies.

Complaints

My only real complaint is that I have yet to find some of the content provided by speakers during the conference (for example, the dropbox link for the Web Perf Dashboard VM discussed during the Aaron Kulick/Cliff  Crocker talk). It would be nice if O'Reilly added links to supplementary content as this is the only thing lacking at this point.

Summary (tl;dr;)

As with previous titles I've reviewed I find the cost of this set ($400) very justifiable. It is inexpensive relative to the cost of a conference pass, not to mention travel and accommodation costs. You also get to see all conference tracks - something you can't do in person. The conference covers a number of technologies that i previously had no experience with (including Puppet, Chef, SPDY and Vagrant) and brings together many of the best and most famous minds in devops. It's really great stuff and if you have an interest in developing large scale web properties or instrumenting and/or boosting the performance of existing properties, this set is a must-have!

Saturday, December 8, 2012

Streaming video from Windows Home Server to Macbook Pro

December 08, 2012 Posted by Jason Irwin , , , No comments

I spent this afternoon trying to stream video from my Asus Windows Home Server to my MacBook Pro. I watch a lot of training videos, so that ability to stream to any PC in the house is vital. Windows makes this easy - on my Windows boxes my home server immediately shows up as a Digital Media Server, allowing streaming of videos, pictures and music.

I use VLC to consume video on Mountain Lion. Despite my media being shared on my home server no media devices were available to VLC, though VLC supports UPnP and SAP out of the box. It turns out that Windows Home Server supports UPnP but due to a bizarre bug/configuration, the requisite port forwarding registry settings are not always present. Fortunately, wegotserved has a great tutorial on enabling UPnP and it took literally 5 minutes (I rebooted to be safe...) to get streaming to my Mac working.

http://forum.wegotserved.com/index.php/tutorials/article/17-configure-upnp-for-windows-home-server/

I only wish the Microsoft hadn't retired Home Server. It is an invaluable component of my home network and one that only seems to grow in utility over time.