For reference: http://postgis.net/install
The most reliable way to get PostGIS on OSX is to download and install Postgres.app. Great for development and testing. Do not mix with other installations. Select the extension when prompted.
# lib/asset_fingerprints.rb -- A hack to get asset_hash to play nice with Rails 2.3.11 (since there is no ActionController::Base.asset_path configuration option). | |
# Same as deployment nginx configuration. | |
# No font/woff because it is already compressed: | |
# http://www.pixelastic.com/blog/87:gzipping-your-font-files | |
AssetHash::Base.gzip_types = %w( | |
application/javascript | |
application/json | |
application/xml |
// Fix to make zepto work with ujs-jquery | |
$.fn.ajaxSend = function(callback) { | |
return this.each(function(){ | |
$(this).on('ajaxBeforeSend', callback); | |
}); | |
}; | |
var jQuery = $; |
<?php | |
/** | |
* Geohash | |
* | |
* @author Keisuke SATO | |
* @license MIT License | |
* | |
* # Based | |
* http://github.com/davetroy/geohash-js/blob/master/geohash.js | |
* Geohash library for Javascript |
class ApplicationController < ActionController::Base | |
... | |
#Problem: | |
#In rails 3.0.1+ it is no longer possible to do this anymore; | |
# rescue_from ActionController::RoutingError, :with => :render_not_found | |
# | |
#The ActionController::RoutingError thrown is not caught by rescue_from. | |
#The alternative is to to set a catch-all route to catch all unmatched routes and send them to a method which renders an error | |
#As in http://techoctave.com/c7/posts/36-rails-3-0-rescue-from-routing-error-solution |
use std::fmt::Debug; | |
//trait ReturnType: Debug + Clone {} | |
// | |
//impl ReturnType for String {} | |
//impl ReturnType for i32 {} | |
#[derive(Debug)] | |
enum Command { | |
Create, |
# Install Dependencies | |
# sudo apt-get install build-essential | |
# sudo apt-get build-dep php5 | |
sudo apt-get install libmysqlclient-dev mysql-client libcurl4-openssl-dev libgd2-xpm-dev libjpeg-dev libpng3-dev libxpm-dev libfreetype6-dev libt1-dev libmcrypt-dev libxslt1-dev bzip2 libbz2-dev libxml2-dev libevent-dev libltdl-dev libmagickwand-dev libmagickcore-dev imagemagick libreadline-dev libc-client-dev libsnmp-dev snmpd snmp libvpx-dev libxpm-dev libgmp3-dev libicu-dev libpspell-dev libtidy-dev freetds-dev unixodbc-dev librecode-dev libglib2.0-dev libsasl2-dev libgeoip-dev imagemagick libmagickcore-dev libmagickwand-dev | |
# Stop Apache | |
sudo service apache2 stop | |
# Cleanup Packages | |
sudo apt-get autoremove |
class Setting < ActiveRecord::Base | |
validates_uniqueness_of :var | |
validates_presence_of :value | |
after_save :send_cron_later | |
#Setting.for(:display).set=(value) | |
def self.for(var) | |
find_or_create_by_var(var) |
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, http = require('http'); | |
var app = express(); | |
var server = app.listen(3000); |
For reference: http://postgis.net/install
The most reliable way to get PostGIS on OSX is to download and install Postgres.app. Great for development and testing. Do not mix with other installations. Select the extension when prompted.