Friday, October 30, 2009

Change Default JVM on OSX

If you install the Java 1.6 JRE on OSX Leopard 10.5 and want to make it default:

open /Applications/Utilities/Java\ Preferences.app

Saturday, October 24, 2009

Giving Up on Windows 7

For some wonderful reason, Windows 7 takes eight minutes to boot on my desktop machine. This is an Intel Core2Quad with 4GB of RAM. Not a speed demon, but no slouch. I have been in *Nix land too long and can't figure out what hardware is stalling the boot process. Horrifically frustrating.

I am not used to not being able to figure things out, but I have reached the point of not caring anymore. Windows is just a game platform for me and I get real work done in Linux or OSX.

Windows XP will play Left4Dead just fine.

Tuesday, September 22, 2009

Set Default Terminal Size in Gnome

This was difficult to find. You CAN set the default size of Gnome Terminal. The following instructions apply to Ubuntu 9.04, so your milage may vary:

Open /usr/share/vte/termcap/xterm:
sudo gedit /usr/share/vte/termcap/xterm
Find the line containing :co#80:it#8:li#24:\ (line 10 in Ubunto 9.04)
Replace the 80 with desired column width, and 24 with the desired row height.
Save and close all terminals.

Sunday, August 30, 2009

Lone Star Ruby Conference 2009

I must say that the conference this year was amazing. This is the first time I have been to a Ruby conference. Though I could have easily learned any of the subjects presented myself, the insight and enthusiasm from the speakers gave me better ideas for implementation and more excitement to actually do something.

I have been inspired and now I want to give a talk next year.

I am still stoked from the experience.

Sunday, August 16, 2009

De-Interlace Video in AcidRip

To enable deinterlacing of video when converting DVD video with AcidRip, add the following to the "Post Filters" field under the "Video" tab: "pp=lb"

Saturday, August 01, 2009

Apple Exploits




Hackers are having a seeming field day with Apple products. Between the Apple Keyboard Firmware hack, the Intel processor firmware hack (this one is OS agnostic), and the iPhone SMS hack it's a bad day to be an Apple fanboy or user.



I'll stick to doing my online banking on my Linux machine.

Sunday, July 19, 2009

Must Read Book for Web Developers

Today I got my copy of Programming Collective Intelligence and I wish I had bought this book back when it came out. In my day job, I am developing mostly social networking type sites, and I could have saved days of hair pulling.

Some days it seems as if I am just writing the same old "dumb" web-sites, and I never really understood how other programmers integrated the massive amounts of data we collect every day into a usable and actionable form, both for user and stake-holder. I figured it involved complicated maths that I either don't remember or never took (dotcom college dropout here). Tobey Segaran puts data mining concepts into readable English and sample code.

I never post book reviews, but I am only 3 chapters in, and I love it.

Monday, June 22, 2009

Adium won't connect to Yahoo Messenger

Do you have Yahoo Messenger connection problems with Adium or Pidgin.  The Adium 1.4 beta fixes the issue.  beta.adium.im

More here.

Wednesday, June 10, 2009

View Contents of SSL CSR

openssl req -text -noout -in host.csr

Monday, May 25, 2009

Pushing to a Gitosis Git Repo for the first time

git push origin master:refs/heads/master

Saturday, May 09, 2009

Errors when Running GWT from Eclipse

I was able to get a preview release of the Google AppEngine SDK for Java last week, and finally had an opportunity to play with it. I installed Eclipse on my 64bit Ubuntu Linux box and all the plugins as suggested by Google's Java docs. Everything worked great until I tried to debug the default app as generated by the Eclipse Plugin.
I got an error in the GWT (Google Web Toolkit) packages saying (among other things)

libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)

With a little digging, I found that this was related to 32bit compiled java libraries being run under the 64bit Java runtime. The solution is to install the 32bit Java runtime binary, and instruct Eclipse to use it.

#From Terminal
sudo apt-get install sun-java-6-bin ia32-sun-java6-bin
sudo apt-get remove gij
sudo update-alternatives --config java
# Select the 32bit runtime


From Eclipse go to Window -> Preferences -> Java -> Installed JRE's -> Add -> Standard VM and use the path /usr/lib/jvm/ia32-java-6-sun-1.6.0.13

Now you can Run -> Debug As -> Web Application

Tuesday, April 21, 2009

Rails and form_for() within Partials

This one tripped me up for almost 2 hours.

When using form_for() within a partial, use the variable reference instead of a symbol when specifying the form object. i.e. Use form_for(@user){|user_form|}, instead of form_for(:user){|user_form|}

I was creating a multi-model form with nested attributes using the new Rails 2.3 fields_for semantics, and the nested model field id's didn't have the numbered "*_attributes_0" suffix string. Ruling out syntax errors, I inspected the nested form objects and found that my user_form.object was nil, and thus the form_for method was not assigning the form object. When led me to find that my use of form_for(:user) was broken. form_for(@user) worked perfectly.

My conclusion may be incorrect, but it appears that using a symbolic reference as an object attribute for form_for() within a partial is broken.

The moral of the story is, just use the variable reference.

Saturday, March 28, 2009

Capistrano deploy.rb for Git and Phusion Passenger

Here is my Capsitrano deploy.rb script/recipe for use with Git repos on servers powered by Phusion Passenger (mod_rails).

http://gist.github.com/87207

Friday, January 09, 2009

Telnet SMTP Escape Character

When connecting to an SMTP server via telnet (i.e. telnet mail.example.com 25), you will be informed that "Escape character is '^]'." This means you need to press CTRL-] (control plus right-bracket)

I am embarrassed how long it took me to realize that.

Sunday, January 04, 2009

MySpace Mobsters Calculator and Strategy Helper

I wrote a Mobsters helper this weekend to help in choosing the best weapons configuration. Enjoy!

I am liking Google AppEngine so far, and this weekend project has really put me onboard with jQuery.