Skip to content

Instantly share code, notes, and snippets.

@papakpmartin
papakpmartin / README.md
Last active Jun 12, 2018
Merging shapefiles and making GEOJSON
View README.md

After downloading the Natural Earth country and state/province shapefiles, unzip them into a directory and then cd into that directory. Then merge the shapefiles into one file called merged.shp by doing...

docker run -v $(pwd):/data geodata/gdal \
ogr2ogr \
  -lco ENCODING=UTF-8 \
  -f "ESRI Shapefile" \
  merged.shp \
  ne_50m_admin_0_countries/ne_50m_admin_0_countries.shp
View temperature-sensor.ino
// This #include statement was automatically added by the Particle IDE.
#include "OneWire/OneWire.h"
#include "spark-dallas-temperature/spark-dallas-temperature.h"
double tempF = 0.0;
int tempSensorPin = D2;
OneWire oneWire(tempSensorPin);
DallasTemperature sensors(&oneWire);
View keybase.md

Keybase proof

I hereby claim:

  • I am papakpmartin on github.
  • I am papakpmartin (https://keybase.io/papakpmartin) on keybase.
  • I have a public key whose fingerprint is 5838 A736 F1E8 D402 CA14 1F91 D0D1 6D2B 8F96 327E

To claim this, I am signing this object:

@papakpmartin
papakpmartin / defaultify.js
Last active Dec 12, 2015
My defaultify function using defaultValue and not a data- attribute
View defaultify.js
/**
* defaultify gets any INPUTs classed with .defaultify and causes them to "empty" onFocus and
* repopulate the default onBlur. This uses the HTML4 built-in `defaultValue` property (see
* https://developer.mozilla.org/en-US/docs/DOM/HTMLInputElement
*
* @returns nothing
* @requires jQuery
* @author KPM
*/
defaultify: function() {
You can’t perform that action at this time.