Tuesday, June 7, 2011

Watching Apple's Keynote Videos in Linux

Essentially, you’d have to dig through Apple site’s HTML/JavaScript and find the video URL for Windows.  And then pass that URL to a stand-alone media player like VLC.

Apparently Chrome for Linux has a QuickTime plugin!  (Or it’s bundled with Ubuntu; I am not sure.)  Watch Sep 2012 event (iPhone 5 launch) is available at goo.gl/Nn77F.

Watch Mar 7, 2012 iPad event video using this command:
vlc 'http://stream.qtv.apple.com/events/mar/123pibhargjknawdconwecown/12oihbqeorvfhbpiubqnfv3_650_ref.mov'

Watch Oct 4, 2011 iPhone event video using this command:
vlc 'http://stream.qtv.apple.com/events/oct/11piuhbvdlbkvoih10/11mnbzxcbnkhbvshdfeuygxvst10_350_ref.mov'
If you have a Linux computer, you cannot watch Apple’s WWDC 2011 keynote video from Apple’s web site.  Because the site picks a video URL based on what your browser/OS is, but it fails miserably if you don’t run an Apple OS or Windows.  So, if you want to see the video, open http://stream.qtv.apple.com/events/jun/11piubpwiqubf06/11piunpaiubsdvadibvas06_350_ref.mov on VLC Media Player and you’ll be good.

Monday, June 6, 2011

Autosaving Vim sessions

Accidentally closing a Vim window with several open files can mean losing a lot of state.  Reopening all files again to continue editing can be daunting, if not in real at least while thinking about it.  Add the following line to your .vimrc:
autocmd VimLeave * mksession! ~/.vim/last-session.vim
You can resume an accidentally closed Vim session by using the command:
vim -S ~/.vim/last-session.vim