Skip to content

Instantly share code, notes, and snippets.

View zbeat's full-sized avatar

Zack Beatty zbeat

View GitHub Profile
@zbeat
zbeat / console.rb
Created August 23, 2017 19:18 — forked from nuxlli/console.rb
To access url helpers (url_for, etc) from Rails console (Rails 3)
# Example from: http://snipplr.com/view/37063/
include Rails.application.routes.url_helpers
# set host in default_url_options:
default_url_options[:host] = "localhost"
# can then use:
url_for()
# Freshen homebrew
brew update
brew upgrade
# The main stuff we need
brew install postgresql
brew install postgis
brew install gdal
# Switch to postgis version 1.5.3 - 2.0 not supported yet
#!/bin/bash
function remove_dir () {
rm -rf "$1_"
if [ -d "$1" ]
then
mv "$1" "$1_"
fi
}