To get started, you currently need my versions of the em-http-request and the oauth gem for this to work. They are available at:
So, download, build and install them. Next, you can do the following: (using twitter as an example):
| require 'sinatra/base' | |
| class Bacon < Sinatra::Base | |
| enable :logging, :clean_trace | |
| get '/' do | |
| 'Hello from Sinatra!' | |
| end | |
| end |
| function getPosition() { | |
| if($('form#plan-journey').length > 0) { | |
| // native support via the W3C Spec | |
| if(navigator.geolocation) { | |
| navigator.geolocation.getCurrentPosition(revGeocode); | |
| // support via the wrapper | |
| } else if(geo_position_js.init()) { | |
| geo_position_js.getCurrentPosition(revGeocode); | |
| // nothing available | |
| } else { |
To get started, you currently need my versions of the em-http-request and the oauth gem for this to work. They are available at:
So, download, build and install them. Next, you can do the following: (using twitter as an example):
| namespace :deploy do | |
| def config(key) | |
| (@config ||= YAML.load_file("config/deploy.yml").symbolize_keys)[key.to_sym] | |
| end | |
| # Hooks as needed | |
| task :local_before do | |
| end |
| function gemset --description 'Switches gemset' | |
| set gemset_name $argv[1] | |
| if [ -n "$gemset_name" ] | |
| set gem_dir "$HOME/.gems-switcher/$gemset_name" | |
| echo "Using gemset: $gemset_name (location: '$gem_dir')" | |
| mkdir -p "$gem_dir/bin" | |
| set -xg PATH "$gem_dir/bin" $GEMLESS_PATH | |
| set -xg GEM_HOME "$gem_dir" | |
| set -xg GEM_PATH "$gem_dir" | |
| else |
| .gmap.map-preview | |
| :width 540px | |
| :height 400px | |
| :margin 5px auto | |
| :border 5px solid #DDD | |
| :background #F1F1F1 url('/images/map-placeholder.jpg') center center no-repeat |
| var BHM; | |
| if(!BHM) BHM = {}; | |
| (function(ns, $) { | |
| var defaultNSAttrs = {}; | |
| var makeNS = function(o) { | |
| return $.extend(o, defaultNSAttrs); | |
| }; |
| if defined?(Rails) | |
| def rr | |
| if Rails::VERSION::STRING == "3.0.0.beta" | |
| puts "Reloading..." | |
| ActionDispatch::Callbacks.new(lambda {}, false).call({}) | |
| else | |
| reload! | |
| end | |
| end |
| BHM.withNS('CKEditor', function(ns) { | |
| ns.editorSelector = '.ckeditor textarea'; | |
| ns.editorOptions = { | |
| toolbar: 'bhm', | |
| width: '74%' | |
| }; | |
| ns.toolbar_layout = [ | |
| ['Source','-','Templates'], ['Cut','Copy','Paste','PasteText','PasteFromWord','-', 'SpellChecker', 'Scayt'], |
| Bighelpmob::Application.routes.draw do |map| | |
| namespace :admin do | |
| resources :users do | |
| resources :participations | |
| end | |
| resources :missions | |
| resources :organisations | |
| resources :pickups | |
| resources :contents |