Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Gratier ThomasG77

View GitHub Profile
@tomhicks
tomhicks / plink-plonk.js
Last active Dec 1, 2020
Listen to your web pages
View plink-plonk.js
@pramsey
pramsey / vsicurl_ogr_fdw.sql
Last active Nov 25, 2019
OGR FDW against remote static files
View vsicurl_ogr_fdw.sql
--
-- Not only does this FDW definition read a remote file over HTTP and provide
-- a tabular view of the data, it also does so even though the file
-- is encased in a ZIP file!
-- See https://gdal.org/user/virtual_file_systems.html for more magic.
--
CREATE EXTENSION postgis;
CREATE EXTENSION ogr_fdw;
CREATE SERVER myserver
@veltman
veltman / tiles.md
Last active Sep 27, 2019
Making a big image zoomable
View tiles.md

Making a big image zoomable

When you have a giant image and you want to make it easy to pan and zoom without downloading the whole 50MB image into someone's browser, a nice workaround is to cut that image into tiles at different zoom levels and view it as it were a map. An example where I've used this technique is The "Snowpiercer" Scenario.

One way to cut your big image into the requisite tiles is with gdal2tiles.py.

Alternatively, this Node script will do the cutting after you install node-canvas and mkdirp:

const fs = require("fs"),
@avoidik
avoidik / README.md
Created Oct 29, 2018
AWS query examples
View README.md

Top 10 Examples of AWS CLI Query

List Volumes showing attachment using Dictionary Notation

$ aws ec2 describe-volumes \
  --query 'Volumes[*].{ID:VolumeId,InstanceId:Attachments[0].InstanceId,AZ:AvailabilityZone,Size:Size}'
[
    {
        "InstanceId": "i-a071c394",
@Pessimistress
Pessimistress / index.html
Last active Dec 19, 2019
Deck.gl + Mapbox Brushing Arcs
View index.html
<html>
<head>
<title>US County-to-County Migration</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src="https://unpkg.com/deck.gl@^6.2.0/deckgl.min.js"></script>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.js"></script>
<link rel="stylesheet" type="text/css" href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.css">
<script src="https://d3js.org/d3.v5.min.js"></script>
@jgaffuri
jgaffuri / .block
Last active Dec 22, 2019
Revenus en France, par commune
View .block
license: EUPL-1.1
height: 700
scrolling: no
border: yes
@jsanz
jsanz / README.md
Last active Jul 31, 2018
#CARTO Maps API & #OpenLayers with #cartojs
View README.md

Simple instantiation of an OpenLayers map loading tiles from CARTO Maps API.

@kgjenkins
kgjenkins / readme.md
Last active Nov 13, 2020
Labels with callout lines in QGIS
View readme.md

Labels with callout lines in QGIS


UPDATE: As of October 2019, QGIS 3.10 has built-in support for label callout lines!


Callouts, sometimes called leader lines, are lines between labels and features on a map. They are useful when constraints of space force a label to be moved away from the

View geojsonnet.md

Geojson.net

Geojson.net will be a replacement for geojson.io, the simple editor for map data. In most ways, it has the same intent, goals, limitations, and ideas of geojson.io - they're both projects of mine.

I created geojson.io as a side project in 2013, and it thrived for a few years, as it simply solved the problem of previewing, modifying, and creating map data. I think it benefited from simplicity and unity of thought: it wasn't a product, it didn't have overarching design goals or any sort of leadership. There was the core functionality, and a bunch of functionality that pretty neatly layered on top of that without making the whole thing too intimidating. I'm pretty happy with how it went.

Over the last two or so years, though, geojson.io hasn't changed much, and the web has. Which means that, in a few ways, it's just straight-up broken: GitHub integration is broken, it was never updated to accommodate for the deprecation of anonymous gists, and

@jlis
jlis / .gitlab-ci.yml
Created May 15, 2018
AWS ECS and ECR deployment via Docker and Gitlab CI
View .gitlab-ci.yml
image: docker:latest
variables:
REPOSITORY_URL: <AWS ACCOUNT ID>.dkr.ecr.eu-central-1.amazonaws.com/<ECS REPOSITORY NAME>
REGION: eu-central-1
TASK_DEFINTION_NAME: <TASK DEFINITION NAME>
CLUSTER_NAME: <CLUSTER NAME>
SERVICE_NAME: <SERVICE NAME>
services:
You can’t perform that action at this time.