Skip to content

Instantly share code, notes, and snippets.

@erichurst
erichurst / Geo.js
Created March 16, 2010 21:03 — forked from kara-ryli/Geo.js
var Geo = navigator.geolocation, // {Object|null} a shortcut to the geolocation static class
options = { // {Object} options available to calls for position
enableHighAccuracy: false, // {Boolean} Whether or not to use more resources to get a more accurate position
maximumAge: 0, // {Number|Infinity} The maximum number of milliseconds since the last check.
timeout: null // {Number|null} The maximum number of milliseconds to wait for a fix
},
watchId; // {Number} an ID to a watch timeout
// handles an error finding the user's position
function onError(error) {
# mongo_template.rb
# fork of Ben Scofield's Rails MongoMapper Template (http://gist.github.com/181842)
#
# To use:
# rails project_name -m http://gist.github.com/gists/219223.txt
# remove unneeded defaults
run "rm public/index.html"
run "rm public/images/rails.png"
run "rm public/javascripts/controls.js"
file 'Gemfile', <<-GEMS
source 'http://gemcutter.org'
gem "rails", "3.0.0.beta3"
gem "bson_ext", '0.20.1'
gem "mongoid", "2.0.0.beta4"
gem "compass", "0.10.0.rc5"
group :test do
gem "rspec-rails", "2.0.0.beta.8"
gem "capybara"
# Bash snippet to open new shells in most recently visited dir.
# Useful if you want to open a new terminal tab at the present
# tab's location.
#
# Put this in your .bashrc or whatever.
pathed_cd () {
if [ "$1" == "" ]; then
cd
else