Skip to content

Instantly share code, notes, and snippets.

View jseppi's full-sized avatar
🍻
😄

James Seppi jseppi

🍻
😄
View GitHub Profile
@jseppi
jseppi / leaflet.EsriRestTileLayer.coffee
Last active April 6, 2019 17:54
Leaflet layer that retrieves tiles from an ArcGIS REST Map Service.
# Leaflet layer that retrieves tiles from an ArcGIS REST Map Service.
#
# The 'typical' way to use the ESRI/ArcGIS Server REST API is to request
# a single map image for the entire screen (as seen in the esri-leaflet.js
# DynamicMapLayer class https://github.com/Esri/esri-leaflet).
# That method is slow and the esri-leaflet implementation uses L.ImageOverlay,
# which doesn't mix well with Leaflet TileLayers.
# The implementation here instead is based on L.TileLayer and uses the
# ESRI REST API "export" method to get multiple images as tiles.
L.EsriRestTileLayer = L.TileLayer.extend(
@jseppi
jseppi / Rules
Last active July 4, 2016 06:59 — forked from bburton/Rules
Default Rules and nanoc.yaml for the nanoc static site generator. The included config.rb is useful for setting up Compass configuration properties if using Compass.
#!/usr/bin/env ruby
# This Rules file is an attempt at a near zero configuration for the common
# use cases when creating a simple site with nanoc. It's meant to have
# better defaults so new users don't have to configure it much if at all.
# For the most part, it copies all files from the content folder to the
# output folder with the same name. It has the following features:
#
# * Certain predefined page extensions such as html, haml, md, markdown and
# textile are routed to "clean" URI's (see below regarding Item identifiers).
@jseppi
jseppi / TNRIS.geojson
Last active August 29, 2015 13:56
TNRIS Logo in GeoJSON
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jseppi
jseppi / README.md
Last active August 29, 2015 14:04
Flight of the Coffee Bean
@jseppi
jseppi / openstreetmap_notes.md
Last active August 29, 2015 14:11
Learn and Edit OpenStreetMap Notes

OpenStreetMap founded in 2004 by Steve Coast. It was originally for mapping the UK because of copyright restrictions on government-created data.

OpenStreetMap is open data: you are free to use it for any purpose as long as you credit OpenStreetMap and its contributors.

Has over 1,000,000 registered users. Over 21 million miles of road data. Over 113 million buildings.

Register at http://www.openstreetmap.org/

#ne_50m_populated_places_simple::labels {
text-name: [name];
text-face-name: 'DejaVu Sans Book';
text-size: 10;
text-label-position-tolerance: 10;
text-fill: #000;
text-halo-fill: #FFF;
text-halo-radius: 1;
text-dy: -8;
text-allow-overlap: true;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jseppi
jseppi / create_districts_topo.sh
Last active June 22, 2017 14:07
Script for creating topojson of congressional districts
SOURCE_FILE=src/tl_2016_us_cd115.shp # unzipped http://www2.census.gov/geo/tiger/TIGER2016/CD/tl_2016_us_cd115.zip to ./src/
OUT_FILE=new_districts.json
SIMP_PARAM=0.015 # lower value = more simplification, ref: https://github.com/topojson/topojson-simplify/blob/master/README.md#toposimplify_spherical_quantile
QUANTIZE_PARAM=1e5
PATH=$(npm bin):$PATH
# Process based on https://medium.com/@mbostock/command-line-cartography-part-3-1158e4c55a1e
set -eu

Keybase proof

I hereby claim:

  • I am jseppi on github.
  • I am jseppi (https://keybase.io/jseppi) on keybase.
  • I have a public key ASBzHabn_ogG8t9mffU2sPWVWNzkoLOjZzOKRlOQzE4r8Ao

To claim this, I am signing this object:

@jseppi
jseppi / index.html
Created December 17, 2019 16:40
Render font previews // source https://jsbin.com/lomovel
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Render font previews</title>
<meta
name="viewport"
content="initial-scale=1,maximum-scale=1,user-scalable=no"
/>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.js"></script>