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
function git-co-externals() { | |
( | |
cd $(git rev-parse --show-toplevel) && git svn show-externals | grep "^/" | | |
while read a b c | |
do | |
# remove first character which is a '/' | |
local=${a:1} | |
if [ -z $c ] | |
then | |
url=$b |
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
services: | |
demo: | |
kml: | |
tms: | |
wms: | |
srs: ['EPSG:4326', 'EPSG:900913'] | |
image_formats: ['image/jpeg', 'image/png'] | |
layers: | |
- name: osm |
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
services: | |
demo: | |
kml: | |
tms: | |
wms: | |
srs: ['EPSG:4326', 'EPSG:900913'] | |
image_formats: ['image/jpeg', 'image/png'] | |
layers: | |
- name: osm900913 |
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 | |
directory=$1 | |
build_cmd=$2 | |
if [ -z "$directory" ]; then | |
echo "This script takes a directory path as first parameter." | |
exit 1 | |
fi | |
if [ -z "$build_cmd" ]; then | |
echo "This script takes a build command as second parameter." |
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
#!/usr/bin/env python | |
import cgi | |
import os | |
import sys | |
if os.environ["REMOTE_ADDR"] in ["207.97.227.253", "50.57.128.197", | |
"108.171.174.178", "89.88.161.33"]: | |
print "Content-type: text/plain" | |
print "" |
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
#!/usr/bin/env python | |
import cgi | |
import os | |
import sys | |
if os.environ["REMOTE_ADDR"] in ["207.97.227.253", "50.57.128.197", | |
"108.171.174.178", "89.88.161.33"]: | |
print "Content-type: text/plain" | |
print "" |
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
% BBI edition %%%%%%%%%%%%%%%%%%%%%%%%%% | |
% add: | |
\newlength{\argtextwidth}% | |
\newlength{\freespace}% | |
\newcommand*{\calcfreespace}[1]{% | |
\settowidth{\argtextwidth}{#1}% | |
\setlength{\freespace}{\maincolumnwidth}% | |
\addtolength{\freespace}{-\argtextwidth}% | |
\addtolength{\freespace}{-\separatorcolumnwidth}% |
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 | |
#=============================================================================== | |
# FILE: import_geonames.sh | |
# | |
# USAGE: sudo -u postgres import_geonames.sh [/path/to/working/directory] | |
# | |
# DESCRIPTION: run the script so that the geodata will be downloaded and | |
# inserted into your database | |
# | |
# ORIGINAL AUTHOR: Andreas (aka Harpagophyt) |
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 sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Index | |
from sqlalchemy.orm import scoped_session, sessionmaker | |
from sqlalchemy.types import Integer, String | |
Base = declarative_base() | |
Base.metadata.bind = "postgres://user:pass@localhost/sqla_test" | |
meta = Base.metadata | |
session = scoped_session(sessionmaker(bind=meta.bind))() |
OlderNewer