This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |