Skip to content

Instantly share code, notes, and snippets.

Eric Hurst erichurst

Block or report user

Report or block erichurst

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# 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
View mongoid-heroku.rb
file 'Gemfile', <<-GEMS
source ''
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"
View Rails MongoMapper Template.rb
# mongo_template.rb
# fork of Ben Scofield's Rails MongoMapper Template (
# To use:
# rails project_name -m
# remove unneeded defaults
run "rm public/index.html"
run "rm public/images/rails.png"
run "rm public/javascripts/controls.js"
View 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) {
You can’t perform that action at this time.