Skip to content

Instantly share code, notes, and snippets.

View kriscarle's full-sized avatar

Kristofor Carle kriscarle

View GitHub Profile
#!/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 / 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'
@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);
./git-copy.sh aabb37fc243675de1194e38f75a554695ed3c111 7b6efc6a0731d0da7ce0d13b19098db2f7da224b ../uploads