Skip to content

Instantly share code, notes, and snippets.

View kriscarle's full-sized avatar

Kristofor Carle kriscarle

View GitHub Profile
./git-copy.sh aabb37fc243675de1194e38f75a554695ed3c111 7b6efc6a0731d0da7ce0d13b19098db2f7da224b ../uploads
@kriscarle
kriscarle / dnn-captions.js
Last active August 29, 2015 14:07 — forked from ajtroxell/dnn-captions.js
display image caption in DNN using longdesc img attribute
$('.ModDNNHTMLC img').each(function(i) {
var img = $(this),
width = $(this).css('width'),
imageCaption = $(this).attr('longdesc'),
figure
if(imageCaption){
if (img.css('float') == 'left') {
img.css('float', '');
figure = $('<figure class="alignleft"></figure>').css('width', width).css('float', 'left');
img.wrap(figure);
@kriscarle
kriscarle / AGSMapboxLayer.java
Last active October 11, 2016 11:19
Mapbox tiles in ArcGIS Runtime SDK for Android
import com.esri.core.geometry.Envelope;
import com.esri.core.geometry.Point;
import com.esri.core.geometry.SpatialReference;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpUriRequest;
@kriscarle
kriscarle / AGSMapboxLayer.as
Created February 14, 2015 00:17
Mapbox Tiles in ArcGIS Runtime for Flex
package com.kriscarle.map.util {
import com.esri.ags.SpatialReference;
import com.esri.ags.geometry.Extent;
import com.esri.ags.geometry.MapPoint;
import com.esri.ags.layers.TiledMapServiceLayer;
import com.esri.ags.layers.supportClasses.LOD;
import com.esri.ags.layers.supportClasses.TileInfo;
import flash.net.URLRequest;
@kriscarle
kriscarle / README.md
Last active August 29, 2015 14:26
OSM PostGIS Views

Like osm2pgsql but running directly on top of the OSM database!

@kriscarle
kriscarle / gist:be72d620318c2703ed60edbe490bcde9
Created November 11, 2016 20:10
DRC Logging Roads Created in 2015 (data exported 20161111)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am kriscarle on github.
  • I am kriscarle (https://keybase.io/kriscarle) on keybase.
  • I have a public key ASDncVPBqc2h0vL13wpfLD8ZuDLaylpGUs-dU7epMiKTTgo

To claim this, I am signing this object:

@kriscarle
kriscarle / docker-compose.yml
Created January 26, 2017 04:10
Docker-compose for rancher, nginx and let's encrypt
nginx-proxy:
image: jwilder/nginx-proxy:latest
ports:
- "80:80"
- "443:443"
volumes:
- '/home/docker/nginx-proxy/ssl:/etc/nginx/certs:ro'
- '/etc/nginx/vhost.d'
- '/usr/share/nginx/html'
- '/var/run/docker.sock:/tmp/docker.sock:ro'
#!/bin/bash
# rename TMS tiles to the XYZ schema
# no quoting, since all files have simple numeric names
# do not run this anywhere else than INSIDE your tiles directory
# run it like this: find . -name "*.png" -exec ./tms2xyz.sh {} \;
filename=$1
tmp=${filename#*/} # remove to first /
@kriscarle
kriscarle / 1_wof_bundle_mato-grosso_85681955_county_simple.geojson
Created January 8, 2018 17:49
WOF bundle: county descendants of Mato Grosso
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.