Ubuntu Edge

Check out the dual booting convergence super phone that Ubuntu is crowd-funding at Indiegogo.

Search engines crawling Javascript

Read a good article about search engines crawling Javascript content: http://moz.com/ugc/can-google-really-access-content-in-javascript-really

I was getting lots of URLs indexed in Google from AJAX endpoint URLs in inline script tags. I did a further test of moving those URLs to HTML5 data attributes and the crawler ignored them, as it should. So a good solution to embed dynamic data in HTML for Javascript modules is to use HTML5 data attributes.

Using a Seagate GoFlex Home network drive in Ubuntu Linux

The GoFlex serves up its network file systems as cifs shares. I was able to navigate to them through the Files app in the Network section, but it was slow and unreliable when trying to transfer files. I got them to mount automatically with the system and be more reliable by following the steps at the follwing link.
* http://www.rangify.com/solved-how-to-mount-seagate-freeagent-goflex-home-nas-drive-to-linuxubuntu-permanently/

Note, that you need to change ‘mode’ in the fstab entries to ‘file_mode’.

More info is here as well: https://wiki.ubuntu.com/MountWindowsSharesPermanently

Alienware X51 Ubuntu

My old Windows XP laptop died a few months back, and I had been debating what the buy as its replacement. I prefer Linux for my music hobbies, but I also want to be able to play most mainstream games. I could buy a Windows machine and install Linux as a dual boot, but I’d rather not have to buy Windows 7/8 if I don’t have to. Also, buying a Windows machine has the risk of incompatibilities with Linux. I could buy an Apple which has good audio software and decent gaming support, but they are a high price point and Apple’s software always treats you like an idiot to the point of not be flexible. I could buy a Linux machine from a company like System76 or ZaReason which is decently priced and gaurenteed to work, but the gaming support is poor.
Then I heard Alienware, now owned by Dell, released a Ubuntu version of their X51 mini-tower and Valve as released Steam and is porting games over the Linux. Score! On top of that my favorite Blizzard games, Diablo 3 and Starcraft 2, both work really well under WINE. I am trying out the demo of CrossOver, which is a streamlined package of WINE. And the company behind it actively contributes to the WINE open source project.
So it arrived last week, and its pretty slick. One surprise as I unpacked it was the size of the power supply. It is HUGE; almost twice as big as a house brick. That must have been one of the ways they reduced what was in the tower itself. The box runs fairly quiet for all the power it packs.
It came with Ubuntu 12.04 LTS, Unity desktop, and NVidia drivers installed. That worked fine, but I wanted some of the newer features in 12.10 and 13.04 that were just released so I upgraded. The upgraded made for better stability and faster performance of Unity. Unity is okay, but I prefer Gnome so I installed Gnome 3 Shell as my desktop which also runs very well on the machine. I spent some days downloading D3, Starcraft 2, Left 4 Dead 2, Team Fortress 2, etc and all the games run pretty damn well. I noticed that I have to make sure Vertical Sync is disabled in the video settings for the games or I see a odd horizontal blip about a third from the top of the screen in the games.
Next, I want to get Jack, Ardour 3 and Guitarix installed to start making some tunes. :)

Java Hiccups on OSX

If you are having Java issues of late, it is likely because Apple put the lockdown on parts of the JRE due to recently discovered security holes.

Details on resolution here: http://derflounder.wordpress.com/2013/01/31/java-blocked-in-safari-on-10-6-x-10-8-x/

spring-mock is now spring-test

Stop beating your head and use spring-test for your Spring 3 project and do NOT include spring-mock.
http://billcomer.blogspot.com/2008/03/spring-mock-or-spring-test.html

Java for Mac OS X 10.6 Update 11 Breaks VisualVM

http://stackoverflow.com/questions/13312229/where-did-jvisualvm-go

I am on OSX 10.6.8 with XCode 3.2.5 and jvisualvm is here after the Java 6 update 37 from Apple.

/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/jvisualvm

So I used the advice from thanosa75 with the binary path I found:

$ cd /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/
$ sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/jvisualvm .

No dice. It starts Visual VM, but it just hangs and sends the process to eat 100% of a CPU.

I noticed a discrepancy between /usr/libexec/java_home and what I have set in my bash profile and launchd.conf.
Before Java update: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
After Java Update: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

The new path is the one documented in the 10.7.x JDK documentation. Apple must have switched 10.6.x to the new JDK configuration that Lion uses.

Updated my env:

$ echo $JAVA_HOME
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
$ grep JAVA /etc/launchd.conf
setenv JAVA_HOME /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

Still, jvisualvm hangs eating a CPU. :(

Bug filed with Apple has no reply yet.
https://discussions.apple.com/thread/4474992?start=0&tstart=0

Workaround: Install app from VisualVM site.
http://visualvm.java.net/download.html

And, if you add the optional plugins, update your script:

/Applications/VisualVM.app/Contents/MacOS/visualvm -cp:a /opt/lib/jmxremote_optional-1.0.1_03.jar "$@"

Ruby Dollar What?

Good references for those shorthand Ruby global variables. Convienient but cryptic.

http://jimneath.org/2010/01/04/cryptic-ruby-global-variables-and-their-meanings.html

http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Variables_and_Constants#Pre-defined_Variables

Enjoy

A New CSS Image Replacement

I never like modifying my HTML, the model for my page, to fit the needs of the design. This has always been a tough spot when you want the text to disappear so you can use images or fancy CSS for the UI of the element. I came across a post about the new method use by the H5BP team which is work well for me.

Check it out.

Getting Padrino up an running using JRuby on OSX

I was recently introduced to an great little framework called Padrino. I want to try out for a spin, and as I’m still a newb to JRuby I hit a few snags. Here are the steps I went through to get Padrino running using JRuby on OSX. Note, you need to have XCode installed because JRuby needs the JDK.

First, install RVM so you don’t go crazy manging differnt ruby dependencies for your projects.

$ curl -L https://get.rvm.io | bash -s stable

Next, install JRuby using RVM. I went for the Ruby 1.9 version because JRuby recommends it.

$ rvm install jruby --1.9

Install bundler and padrino gemsets.

$ gem install bundler padrino

Now, I hit an error in one of my gems complaining about a C extension. I am thinking my solution wasn’t the best, because JRuby I don’t think should be using cext, but here it is anyway. I found this solution documented in a ticket here. It looks like this will go away with a newer version of RVM.

$ cd ~/.rvm/rubies/jruby-1.6.7.2/
$ ant clean cext

If you are getting warnings about openssl, it has to do with packaging issues currently in JRuby.

JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.

To get full openssl support, you need to not only install the gem like the message says, but add it to you Gemfile to make it visible to your project.

gem "jruby-openssl", :platforms => :jruby

I was up and running, but every time I tried to access the database, my app would crash and burn.

dyld: lazy symbol binding failed: Symbol not found: _rb_check_safe_obj
Referenced from: /Users/bbergstrom/.rvm/gems/jruby-1.6.7.2/gems/sqlite3-1.3.6/lib/sqlite3/sqlite3_native.bundle
Expected in: flat namespace

dyld: Symbol not found: _rb_check_safe_obj
Referenced from: /Users/bbergstrom/.rvm/gems/jruby-1.6.7.2/gems/sqlite3-1.3.6/lib/sqlite3/sqlite3_native.bundle
Expected in: flat namespace

Trace/BPT trap

I threw the question out on the JRuby mailing list and quickly got a response that I needed to use Java database adapter gems instead of the default C extensions.
I added this to my Gemfile:

gem 'activerecord-jdbcsqlite3-adapter', :platforms => :jruby

Now, I am up and running. Padrino has taken the JRuby stage. :)