Skip to content

Instantly share code, notes, and snippets.

View krdyke's full-sized avatar

Kevin Dyke krdyke

  • Oklahoma State University
  • Stillwater, OK
View GitHub Profile
@sebsto
sebsto / gist:19b99f1fa1f32cae5d00
Created August 8, 2014 15:53
Install Maven with Yum on Amazon Linux
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
@kalxas
kalxas / data-gov-csw-howto.rst
Last active October 25, 2022 14:23
Data.gov CSW HowTo
@saverkamp
saverkamp / CatcherUploadExample.csv
Created February 24, 2014 22:13
Sample CONTENTdm Catcher upload script. Uses Catcher class from: https://gist.github.com/saverkamp/9197945
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
Alias,CDM_page_id,CDM_field,Value
byington,3160,transc,"Thursday October 25th 1900 Did two churnings this morning and finished putting the tomato pickle away. I put in all the afternoon doing mending Will busy about the place and Mrs Evans helped Leonard with the corn the new man went back to town tonight. Friday October 26th 1900 Will took the butter to town. I was busy with the work till noon I did a lot of baking. I cut out shirts and sewed all afternoon. Saturday October 27th 1900 I sewed a little and got the dinner be a little after eleven. Will and I went to town in the afternoon to have my teeth finished. It has been a warm week, today was like summer. I had a letter from Mother. Sunday October 28th 1900 I was busy about the house most of the forenoon Leonard and his wife were away all day. It rained some in the forenoon. We were up to Stevens in the afternoon. I spent the evening reading. Monday October 29th 1900 It rained in the morning so Leonard could not husk corn. Will was bus
@andrewxhill
andrewxhill / density_grid.sql
Created March 19, 2012 14:50
Create a density grid from geometries. For use in CartoDB
CREATE TYPE CDB_DensityGridPair AS (
geom GEOMETRY,
val FLOAT
);
CREATE OR REPLACE FUNCTION CDB_DensityGrid(table_name TEXT, geom_name TEXT, dimension FLOAT)
RETURNS SETOF CDB_DensityGridPair AS $$
DECLARE
BEGIN
RETURN QUERY
EXECUTE 'SELECT ST_Envelope(GEOMETRYFROMTEXT(''LINESTRING(''||(st_xmax(geom)+(seed/2))||'' ''||(st_ymax(geom)+(seed/2))||'', ''||(st_xmin(geom)-(seed/2))||'' ''||(st_ymin(geom)-(seed/2))||'')'',3857)) as geom, val FROM (SELECT '||dimension||' as seed, count(*)::float as val,