Skip to content

Instantly share code, notes, and snippets.

View mikekelly's full-sized avatar

Mike Kelly mikekelly

View GitHub Profile
var GEO_LOCATION = {
watchID: null,
callback: null
};
GEO_LOCATION.mySpot = function(position){
var lat = (position.coords) ? new String(position.coords.latitude) : position.x;
var lon = (position.coords) ? new String(position.coords.longitude) : position.y;
return GEO_LOCATION.callback(lat, lon);
}
@mikekelly
mikekelly / jsybus_geo_data
Created October 11, 2011 08:40
Bus Stop Geo Location Data
[
"AA BOX,
49.19379,
-2.03498,
2323,
3,
1",
"AALSMEER,
49.22448,
-2.06781,
# Critical default settings:
disable_system_gems
disable_rubygems
bundle_path '.gems/bundler_gems'
# List gems to bundle here:
gem 'rails_dm_datastore'
gem 'rails', "2.3.5"
# Needed for Devise-Plugin
{
"links":{
"self":"/orders",
"link-docs":[
{
"name":"v1",
"href":"http://api.example.com/docs/v1/{link}",
"templated":true
}
],
def create
card = current_user.credit_cards.create(card_params)
if card.persisted?
render :success
else
render :failure
end
end