Skip to content

Instantly share code, notes, and snippets.

Avatar

Bruce Crevensten brucecrevensten

View GitHub Profile
View gist:d833d7ea52514834a5411439b2dc430d
## 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 Apr 22, 2022
Configuring Leaflet, GeoServer, GeoWebCache with custom projection
View gist:a16a554ee1c64d9ac475a1468e94f508

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).

View gist:288817ea067dd118a85c
services:
demo:
tms:
layers:
- name: ginaBdl
title: GINA BDL
sources: [gina_bdl_cache]
caches:
View gist:a065ea0f49a039475760
services:
demo:
tms:
layers:
- name: bing
title: Bing Maps
sources: [bing_cache]
caches:
@brucecrevensten
brucecrevensten / gist:860b02c5dffd35790a57
Created May 9, 2014
snap drupal comm charts modal example
View gist:860b02c5dffd35790a57
$('#modal_name_id').button({
text: false,
icons: {
primary: 'ui-icon-help'
}
}).click(function(e) {
$('#modal_block').show().dialog({
draggable: false,
modal: true,
title: 'About scenarios',
View gist:7091515
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:6542449
Created Sep 12, 2013
Mapserver configuration to connect to PostGIS data source for EPSG:3338 data
View gist:6542449
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
View gist:6471359
[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:3828043
Created Oct 3, 2012
example of markdown syntax
View gist:3828043

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.
@brucecrevensten
brucecrevensten / unboxing.md
Created Aug 1, 2012
Unboxing PostgreSQL - OSCON 2012 - Notes
View unboxing.md

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"