- Download the SDK from ESRI's website http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api
- Extract the SDK, and put the contents of the directory in a known location, I used
~/local/filegdb
. Here's an example path to one of the files:~/local/filegdb/lib/libFileGDBAPI.dylib
- I use
~/local/filegdb
so it can stay isolated in it's own place. You can put it anywhere, but the next few steps might be different. - Go into the directory containing the FileGDB SDK, e.g.
~/local/filegdb
- ESRI built these dylib's using
@rpath
's, so to avoid needing to mess withDYLD_LIBRARY_PATH
, I updated the@rpath
's usinginstall_name_tool
. There might be a more elegant way to handle this. If so, comments are welcome! - Here are the commands I used to patch the dylibs, this is not required if you want to use
DYLD_LIBRARY_PATH
yourself:
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
#!/bin/bash | |
# | |
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box | |
# http://wildfish.com | |
# add the ubuntu gis ppa | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update |
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
if ($request_uri = /) { | |
set $test A; | |
} | |
if ($host ~* teambox.com) { | |
set $test "${test}B"; | |
} | |
if ($http_cookie !~* "auth_token") { | |
set $test "${test}C"; |
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
// Tile server using the node web framework Express (http://expressjs.com). | |
var app = require('express').createServer(); | |
var tilelive = require('tilelive'); | |
require('tilelive-mapnik').registerProtocols(tilelive); | |
var filename = __dirname + '/' + 'stylesheet.xml'; | |
tilelive.load('mapnik://' + filename, function(err, source) { | |
if (err) throw err; | |
app.get('/:z/:x/:y.*', function(req, res) { | |
source.getTile(req.param('z'), req.param('x'), req.param('y'), function(err, tile, headers) { | |
// `err` is an error object when generation failed, otherwise null. |
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
#!/bin/sh | |
# mpo2gif | |
# convert all .mpo files in a directory to a animation gif. | |
# Source: https://gist.github.com/878450 | |
# this idea is from http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=16275 | |
# this script requires exiftool and imagemagick. | |
for file in *.[Mm][Pp][Oo0]; do |
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
#!/bin/bash | |
# | |
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box | |
# http://wildfish.com | |
# add the ubuntu gis ppa | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
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
import math | |
import random | |
def getSuccessors(color): | |
def perm(l, n, str_a, perm_a): | |
"""Generate every permutation of length `n`, selecting from the | |
possible values in `l`. | |
""" | |
if len(str_a) == n: | |
return (str_a,) + perm_a |
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
from django.conf import settings | |
def email_template( | |
template_name = None, | |
template_context = None, | |
subject = '', | |
recipients = None, | |
sender = settings.DEFAULT_FROM_EMAIL, | |
fail_silently = False, | |
use_markdown = False, |
OlderNewer