Saturday, 3 December 2011

Shortee v1 Launches

If you have ever needed to quickly record having done something (paid an invoice, drove 100 business miles?) then I'm happy to say I might have a solution...

Shortee is a logging syntax for humans that is also parseable by computers.  

A quick example might be:

@JeremyNevill drove 100miles 01/dec/2011 

This indicates I drove 100 miles on the 1st Dec 2011, and would be an easy way to store business mileage that I later need to claim back from the company.  

I send myself Shortee messages and simply store them in my gmail account, ready for querying when I need to answer a question on what I have done... e.g. what mileage did I drive in December?

I'm currently working on a Shortee parser to enable Shortee specific applications, in the mean time however feel free to check out the Shortee specification over at GitHub.  I have open sourced the license so I'm hoping others will use the syntax and help out refining it as we go.


Sunday, 4 September 2011

How to setup a Heroku app with a Xeround Cloud Mysql Instance

JV was interested in how I got Heroku to talk to Xeround... here's how I did it:

Note: This is how I did it with a separate Xeround account, rather than using the Heroku add-on method.  I did this because my db is currently fairly small so the 500mb option from Heroku was a bit bigger/more expensive than I needed.

On the Xeround side:

1) Signup and setup your new db instance at http://www.xeround.com

2) Add a user to the xeround db with the right permissions and note down the username/password

3) Import your db into your xeround db - I used a phpmyadmin backup from my existing mysql server, then a rake db:migrate to bring it up to the latest version on my local dev laptop, followed by an import via navicat using the credentials from step 2) above

4) Note down one of the urls for your db, e.g. ec2-999-202-xxxxx

So you should end up with:
a) A db instance on the Xeround cloud (your_instance_name)

b) A user with access to the instance (your_db_username/your_db_user_password)

c) A DNS Name and port for the instance (your_xeround_instance_DNSName:portnum)

And on the Heroku side:

1) Hook up your Heroku app as their docs detail - http://devcenter.heroku.com/   I got my app running using Postgresql with the rake create, migrate, seed commands just to test out a blank db install.

2) Now you need to repoint your std Heroku app using Postgresql to the external production Xeround db instance using mysql...

3) View your current app config using:
heroku config --app your-herokuapp-123
... where your-herokuapp-123 is the name of your Heroku app.  This shows you the app config values that Heroku is using, and the key one we are looking to overload is the DATABASE_URL

4) Set your DATABASE_URL config value as follows:
heroku config:add DATABASE_URL="mysql://your_db_username:your_db_user_password@your_xeround_instance_DNSName:portnum/your_instance_name" --app your-herokuapp-123

5) Check the config values again:
heroku config --app your-herokuapp-123 
... and you should see your new DATABASE_URL

6) Restart your Heroku app:
heroku restart --app your-herokuapp-123  
... and hopefully you're in business.

Once I'd worked out the key was to override the default DATABASE_URL it was plain sailing, all I had to do was shift the db instance from Ireland to the ec2 data centre in the US to improve performance ;-)

Wednesday, 24 August 2011

WDC Relaunched using Latest Tech

I have recently relaunched http://www.wakeboard.com as 'WDC - the wake as it happens'... showing 24/7 tweets, results, riders.

This is a tweet/fb/news aggregation engine that also hooks into my wakeboard competition database of results, rider performance etc.  The plan is to merge the metadata we have on competitions and riders into the publicly available tweet/fb content that is steadily being posted during the day.  I've been using the site myself to keep up with what the top riders are up to and it's great to see a rider post about a comp, then see whether they won the comp the previous year.  There's more to come as usual, just need to find an awesome data entry helper ;-)

The latest dev and hosting tech underpinning the site includes: 

HostingHeroku (cloud based rails platform), Xeround (cloud based mysql database), NewRelic (monitoring), StillAlive.com (testing and monitoring)

Dev Tools: Macbook Pro laptop on OS X Lion, Rubymine Rails IDE, Git, Unfuddle

To keep me going: Jura Impressa C5 coffee machine, Sonos music system

Developing with the above setup is truly fun and it's impressive what you can achieve on the train nowadays with the right kit.

Sunday, 14 August 2011

Heroku and Xeround for Wakeboard.com

Some very early morning tinkering sessions have yielded my 2nd production app move onto some very interesting cloud hosting platforms ... e.g. Heroku and Xeround.

Wakeboard.com now runs on Heroku using Xeround as the scalable cloud based backend db.

I'm trialling Xeround for a month to see how it performs and so far it's been reasonable, now that I've shifted the db instance to the US as having it in Ireland (Amazon's Euro server location) proved sluggish.

Setup was easy on the Xeround site, and a little tricky on Heroku to get the two to talk together... guess they really want you to use their Postgresql offerings.

So I now have my Ruby on Rails website platform running on dev, staging, and two live instances... managing all this via Git and Heroku is proving to be pretty good and I can code on the train then deploy back in the home office, geek heaven.

Thursday, 6 January 2011

Philippines Added to Wakeboard.com

It's the new year and the first competition of 2011 is in Philippines.  To host this I have added a new country to Wakeboard.com to hold all comps held in the Philippines.

Tuesday, 4 January 2011

Facebook Facebook Facebook

I've finally relented and wired up Wakeboard UK to Facebook.  It's obvious the way things have gone now that nearly all mobiles are able to grab Facebook streams on the move.  Stage one is the hook up the news articles on Wakeboard UK over to a Fanpage on Facebook.  Ping.fm provided the bridge and I wrote the feed for the articles homepage, nice and simple.

Another bit of Facebooking(?) I did recently was to investigate one of my younger rellies' hacked facebook account.  Interestingly the mechanism involved a worm like messaging system that directed the unsuspecting victim to a fake login page... thus allowing harvesting of the Facebook credentials.

Once nabbed the worm iterated the user's contact list sending the same phishing message on... simple but effective.  Cleanup involved resetting my rellie's password and double checking they hadn't 'Liked' something they didn't like.  We also turned off mobile posting as the worm messages had come via the mobile api.  Finally we gave my unsuspecting relatives a short course on checking https certificates and making sure the url matched the website.

Thursday, 2 December 2010

Tagging Photos with Competitors

Just added the ability to tag photos in Wakeboard UK with the competitors who are in them.  Check out Nancy's profile page for an example.