Wednesday, November 7, 2012

Fun Webby

Stumbled on the cutest webby recently.

Check it out, you won't regret it.  It's super cute and Shoelace reminds me of my Missy, haha.

Friday, November 2, 2012

Thursday, September 20, 2012

Cygwin and Ruby

When developing on Windows, I don't truly feel at home until I install cygwin.  I don't know how I'd live without the great command line tools like grep, less, vi, find, wc, diff, the list goes on and on.  Sure I could find Windows equivalent and dl them all, but cygwin gives it all to me right away in one place.

So when developing in Ruby, I wanted something compatible with cygwin.  I had previously installed Ruby in Windows and relied on cygwin finding the Ruby executable when I ran my Ruby code.  This is fine for just using Ruby, but when I wanted gem and irb, I was SOL.  I had to install from source.  Luckily, this was super easy:

  1. Using the cygwin setup, install make, gcc, libiconv, openssl, libyaml-devel, zlib, zlib_devel and wget.
  2. Then navigate to and grab the url for the source of ruby that you want to install and wget it.
    1. wget
  3. Then untar it and cd into the ruby* directory
  4. Run ./configure
  5. Run ./make
  6. Run ./make install
  7. Then test it!  
    1. which ruby and it should be something like /usr/local/bin/ruby
Now you have ruby, gem, irb and all the rest.

Tuesday, August 21, 2012

Heroku Weirdness

I love Heroku.  I love the ease and simplicity.  But today, as in right now at 4am, I have been dealing with this horrible issue for HOURS.  I was having tons of problems with any heroku db tasks that I was trying to execute.  I couldn't migrate nor could I check the version.  And everytime I ran those commands, the console would hang.  It made no sense!  I tried all sorts of random things that I don't even want to get into.  Finally out of desperation, I upgraded my heroku cli.  And not from the friendly heroku update (which wasn't working for me), but from actually installing it from

FINALLY that worked.  The problem was that the heroku command was out of date and whatever magic incantation it was issuing, was different between my version (2.26.0) and the latest (2.30.3).  ARG!!!  I guess I would have expected a message like, "Your version of the heroku cli is out of date, please update it."

So I'm posting this in hopes that if someone out there encounters this, they'll save hours of banging their head on the desk.

Alright before I go quick review of heroku commands:

Migrate:          heroku run rake db:migrate
Reset:            heroku pg:reset
Check Version:    heroku run rake db:version

Check Status
ps:               heroku ps
logs:             heroku logs
scale (2 web and 1 worker): heroku ps:scale web=2 worker=1

Restart app:      heroku restart
Restart worker 1: heroku restart worker.1

There are a bunch more but those are the ones I use more often so hopefully it'll help you out as a quick reference.

Friday, August 17, 2012

Eclipse Aspectj Classpath

Just ran into this, the aspectj maven dependency was being ignored and not added to the classpath in eclipse after I ran: mvn eclipse:eclipse Silly problem with an easy solution: maven-eclipse-plugin 2.7 none

Tuesday, August 7, 2012


Not sure if I mentioned this post, but I always find myself going back to it to reconfigure Console2.

Monday, July 2, 2012

On Second Thought

After much consideration, my Thought of the Days will stay on gchat and twitter. My random musings are quick and often too brief to deserve an entire post. As such, make sure to check out @jonnyman9 on the twitter!

Thursday, June 28, 2012

Thought of the Day Thoughts

I used to post daily "Thought of the Day" back when AIM was still popular. I would then archive them so I could read them later and chuckle. I've since lost them all and with AIM not as popular, I've have stopped posting. But recently I've decided to try and get back in it on my gchat status and to archive them, I'll save them here in the form of posts. So hopefully this is the first in a series of them. Thought of the Day: Courtesy of Cheryl, actually the girl in the article actually reminds me of Cheryl. The article really makes you think though. How often does jog by groping really occur? Is this a real problem? Or is this just one of those crazy Canadian things? Something to think aboot.

Wednesday, June 13, 2012

Random Stuff With Tomcat and Applets

Lately I've just been blogging about random things that I learned or use that I think others would find helpful. I'll try and have more insightful things up later, but for today, here's more random crap I used today!

Tomcat Server

Use more debuggery.  Should be easy with Tomcat7 right?  Shocker, it is.
1.  cd $CATALINA_HOME #that's the tomcat home
2.  vi bin/
On the first line (after their comments) just drop in

export JPDA_ADDRESS=8787
export JPDA_TRANSPORT=dt_socket

Now at the bottom, comment out

#exec "$PRGDIR"/"$EXECUTABLE" start "$@"
and add in 
exec "$PRGDIR"/"$EXECUTABLE" jpda start "$@"

Terrific, are we done?  Yes.

Linux Distro

I was also using a random linux server today and couldn't figure out what distro it was.  A quick:
cat /etc/issue 
solved that one real quick for me.
Red Hat Enterprise Linux Server

Applet JVM Args

Gah, applets.  Can't believe I'm working with them.  How the hell do you pass jvm args into these damn things??  Turns out you have to set a system env variable

_JPI_VM_OPTIONS='-Xdebug -Xrunjdwp:transport=dt_socket,address=8788,server=y,suspend=y'

You gotta restart your browser though.  But now, when my applet runs, it'll sit and wait for me to connect my debugger to it (b/c of the suspend=y).

*I hope you never ever have to do applet development and never have to use this

Wednesday, June 6, 2012

How I Imported Ant project into Eclipse

I haven't used Ant in a while and forgot how to 'mvn eclipse:eclipse' it as it were to create an Eclipse project from my build.xml.  The following steps is what I did:

1.  Go to File -> New  ->  Project
2.  Select "Java Project from Existing Ant Bundle"
3.  Right click project  ->  properties
 a.  Java Build Path
  1)  Source tab
   a)  Unclick 'Allow output folders for source folders'
   b)  Default output folder: Specify the same folder that you specified in your build.xml
  2)  Libraries
   a)  Add External JARS and select jars used in your ant file.
   b)  Add Library  ->  JRE System Library.  Select JDK home.
    *Make sure you have the JDK installed.  If not, click Alternate JRE.  Then click Installed JREs and find your JDK home.  Then use that

* I had to delete the .class files created automatically on import, before I had a shot at changing the settings above.

Wednesday, May 30, 2012

Ruby in Cygwin

I have to write a note to myself b/c I keep forgetting.
When running ruby in cygwin (assuming ruby is installed using the windows installer), don't do:


instead ruby to the path (using the installer or by hand) and then in the ruby script put:

#!/usr/bin/env ruby

Tuesday, May 29, 2012

Setting up Git with Mac and Windows

The last time I setup a git server, I setup Gitosis on a machine running Ubuntu (can't remember the version for the life of me).  But seems like all the hoopla is now with Gitolite, so I decided to try my hand at that.

My challenge this time though, is to set up Gitolite on a Mac running Lion and do it from my Windows 7 machine.  Doesn't sound so tough, but there were a couple of gotchas I think worth mentioning here.  Let's go through this thing step by step.

Client Side

1.  My windows tools IMO are sorely inadequate and the first thing I always do is to install cygwin.
Make sure you include vim and open-ssh (and optionally keychain, I think I talk about this in a previous post) packages and whatever else you want.

2.  Next go ahead and grab git for windows and install it.  Use whatever configurations you want.

3.  Open up a cygwin terminal and run
ssh-keygen -t rsa
And optionally set a password when prompted.

4.  mkdir ~/.ssh using cygwin if that directory does not already exist

5.  vi ~/.ssh/config and put the following:

Host gitolite
HostName your.hostname
User git
IdentityFile ~/.ssh/id_rsa

6.  Heres a bit of the trickyness, run the "Git Bash" shell.  Now vi ~/.bashrc and put in the following:
export HOME="C:\cygwin\home\USER" 
replacing USER with your username of course
Why did we have to do this?  The Git Bash for whatever reason decided to put your home directory at '/Users/USER'.  Then when git uses ssh to connect to the remote repository, it was looking in the wrong place for the ssh config :(.  Changing the home like we did enables git (using ssh) to find the ssh config in the right place.

7.  Go ahead and close and reopen your git bash shell.  Now let's set some basic git configs:
git config --global 'Jonathan Keam'
   git config --global ''

Server Side

1.  Go sit at your Mac and make sure that you have an account (for me it was jkeam, and I'll refer to your user name either as jkeam or USER from here on in) on the machine.  Additionally create another user 'git'.

2.  Ensure they both have remote access.
System Preferences > Sharing > Remote Login

3.  Now create a directory where we will install gitolite.  (I created a /Library/Source and allowed my git user to have total permission in that directory)

4.  cd to said directory and make sure you are now the git user.

5.  Lion should have git already installed for you, so go ahead and just:
git clone git://

6.  Run ./gitolite/install

Client Side

1.  Sucks I know, we have to go back to the client.  But from here run
scp ~/.ssh/ jkeam@mac-host:~/
replace jkeam with yourself (in both places, before the @ and before the .pub) and mac-host with the real hostname of the mac

Server Side

1.  Ensuring that you're still the git user, run
/Library/Source/gitolite/src/gitolite setup -pk ~/
This installs your public key as the key to be used for the gitolite admin.

Client Side

1.  Now the test.  Run:
git clone gitolite@gitolite-admin
This is the special gitolite that we setup in our config from step 5 from the first client setup.  This is a must because otherwise you would get this error.

2.  From here you should have gotten the special repository where configuration settings can be made.
vi gitolite-admin/conf/gitlite.conf
and add whatever repos and users you want.  For more, info click the link.

3.  After adding the repos and users in the conf file, you can simply clone them and there they are.

Hopefully this wasn't too confusing and works for you!

Thursday, May 24, 2012

Codeschool's in Session

I was recently introduced with Codeschool and have fallen in love with it.  For those of you who don't know, codeschool is a neat way of learning some fun stuff in, you get a nice looking console thing in the browser where you can actually hack out some code.  Granted, you don't get total freedom, and the code you see is always based around a challenge/problem that you need to solve.  But this is fine as the challenge is based on some video tutorial that serves as a fun lecture.

Check them out!

And for fun, heres my profile.

Wednesday, May 16, 2012

Checking in

I haven't posted in years...ok hyperbole, maybe only a month.  But feels like years.  Guess I been busy??  Doing all sorts of randomness.  Diablo 3 came out just a few hours ago.  That's pretty big.  I'm scared to get it lest I lose my life in it haha.

But I stumbled upon this interesting post on Dart, a very curious language, that forever whatever reason has gained 0 followers (hyberbole again).

Someone's Dart thoughts

Friday, April 6, 2012

Bash the Bashrc

So I messed up my bashrc.  I forgot exactly what I did, but when I logged in, my shell would crash.  ARG!!  So I had to somehow log in and fix it, even though logging in was the problem to begin with.  Searching the interwebs revealed a few solutions, but the one that worked was:

ssh jkeam@host -t "bash --noprofile --norc"