Skip to content

Instantly share code, notes, and snippets.

View brucecrevensten's full-sized avatar

Bruce Crevensten brucecrevensten

View GitHub Profile
@brucecrevensten
brucecrevensten / unboxing.md
Created August 1, 2012 22:22
Unboxing PostgreSQL - OSCON 2012 - Notes

Postgres configuration and ops considerations -- notes taken during OSCON 2012

Presented by Christophe Pettus.

Authors site: thebuild.com

Nomenclature

  • database is set of tables & schema objects,
  • mysql "databases" === postgres "Schema"
@brucecrevensten
brucecrevensten / gist:3828043
Created October 3, 2012 16:25
example of markdown syntax

About using Markdown

Hi -- when composing documents that are in a plain-text format, we occasionally want to use symbols to indicate formatting even when the document is likely to often be rendered as plain text. In this case, it can be useful to use a structured markup language that isn't as verbose or intrusive as HTML. One popular syntax is called Markdown, and it's used in a number of CMS systems and is widely supported by various programming tools. For example, it's used pretty much anywhere you can enter text in Github.

This syntax has some good benefits:

  • It's easy to learn and to type.
  • It's readable in plain text format, especially compared to HTML documents.
  • Lots of tools will transform it to good looking HTML if it's being viewed on a web site.
  • It's hard to be consistent when doing ad-hoc formatting in plain text documents, and this is a consistent syntax that works well.
[root@icarus gdal-1.10.1]# gdalinfo "PG:host=hermes.snap.uaf.edu port=5432 dbname='sea_ice_atlas' user='sea_ice_atlas_user' password='' schema='public' table='example'"
Warning 1: Cannot find information about public.example table in raster_columns view. The raster table loading would take a lot of time. Please, execute AddRasterConstraints PostGIS function to register this table as raster table in raster_columns view. This will save loading time.
Driver: PostGISRaster/PostGIS Raster driver
Files: none associated
Size is 241, 161
Coordinate System is:
PROJCS["NAD83 / Alaska Albers",
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.257222101,
@brucecrevensten
brucecrevensten / gist:6542449
Created September 12, 2013 19:13
Mapserver configuration to connect to PostGIS data source for EPSG:3338 data
MAP
NAME "Sea Ice Atlas"
IMAGECOLOR 0 0 0
TRANSPARENT ON
SIZE 256 256
STATUS ON
CONFIG "MS_ERRORFILE" "/var/www/html/ms_error.txt"
DEBUG 5
OUTPUTFORMAT
p
| Lots of running
| text goes here but then
a(href="/somewhere") I want an inline link
| whatever whatever
...watch out for the spaces between the link and the surrounding paragraph text. (Pseudocode here).
@brucecrevensten
brucecrevensten / gist:d833d7ea52514834a5411439b2dc430d
Created June 7, 2017 03:58
Sketch for SNAP Drupal Docker build
## Local development instance with Docker
### Setup Docker containers
1. Install [Docker](https://www.docker.com/) if you have not already.
1. Grab database and files and save them to your `~/Downloads` folder as `snapdb.sql` and `files.bz2` respectively.
1. Download [Drupal 7](https://ftp.drupal.org/files/projects/drupal-7.54.tar.gz) to `~/Downloads`.
@brucecrevensten
brucecrevensten / gist:a16a554ee1c64d9ac475a1468e94f508
Last active April 22, 2022 13:54
Configuring Leaflet, GeoServer, GeoWebCache with custom projection

Properly configuring GeoServer / GeoWebCache with Leaflet and custom projections (Proj4Leaflet)

These instructions demonstrate the process for EPSG:3572.

Set up a Gridset for the appropriate projection.

Geoserver Admin > Tile Caching > Gridsets > New Set Name / Projection to EPSG:3572, when you tab out of the Projection box it should autocomplete a bit of information here, such as Units, Meters per Unit.

Under “Gridset Bounds,” > Compute from maximum extent of CRS. We’ll need these numbers to configure Leaflet. (An error at the top may show, “Field ‘Gridset Bounds’ is required,” ignore that).