# Filter docker image running with port 5432 to get IP to use for Pgadmin connexion
# Get the key of the inspected network (one in our case) from this image using docker inspect
# Provide the key to access to the IP of the docker container with DB
# Copy/paste to use in PgAdmin (PS: we use a local docker running with postgres user but passwordless)
key=`docker inspect $(docker-compose ps |grep 5432 |cut -d ' ' -f1) |jq '.[].NetworkSettings.Networks|keys[]'` \
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch'); | |
const mirrors = ['astuteinternet', 'ayera', 'cfhcable', 'cytranet', 'datapacket', 'excellmedia', 'freefr', 'gigenet', 'iweb', 'jaist', 'kent', 'liquidtelecom', 'managedway', 'nchc', 'netcologne', 'netix', 'newcontinuum', 'phoenixnap', 'pilotfiber', 'razaoinfo', 'superb-dca2', 'superb-sea2', 'svwh', 'tenet', 'ufpr', 'versaweb']; | |
const url = 'https://sourceforge.net/projects/filezilla/files/FileZilla_Client/3.31.0/FileZilla_3.31.0_win64-setup.exe/download'; | |
// Find the fastest Sourceforge mirror manually | |
// The usual use case would for Promise.race would be | |
// when calling images from multiple servers | |
// (imagine different AWS S3 storage) to get the fastest one | |
var p = Promise.race( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!-- | |
This can be used to test the tile serving. | |
In a browser, open this as a local file. | |
You will have to start the app server instance without the host option, so that it | |
will serve as "localhost". | |
--> | |
<html lang="en"> | |
<head> | |
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## How to reproject to EPSG 2154 | |
# Get data | |
cd /tmp/ | |
wget http://www.douane.gouv.fr/Portals/0/fichiers/datadouane/geolocalisation/annuaire-des-debits-de-tabac-2018.zip | |
# Uncompress | |
unp annuaire-des-debits-de-tabac-2018.zip | |
# Take only 10 first lines |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code borrowed from https://subscription.packtpub.com/book/application_development/9781783984985/1/ch01lvl1sec18/creating-a-standalone-application | |
# and upgraded for QGIS 3.0 | |
import sys | |
from qgis.core import (QgsApplication, QgsFeature, QgsGeometry, | |
QgsProject, QgsVectorLayer) | |
from qgis.gui import QgsMapCanvas | |
from qgis.PyQt.QtCore import Qt | |
# Unused so commented | |
# from qgis.PyQt.QtGui import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules/ | |
package-lock.json | |
*.geojson | |
*.gpkg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from h3 import h3 | |
geoJson = {'type': 'Polygon', | |
'coordinates': [[[37.813318999983238, -122.4089866999972145], | |
[ 37.7866302000007224, -122.3805436999997056 ], | |
[37.7198061999978478, -122.3544736999993603], | |
[ 37.7076131999975672, -122.5123436999983966 ], | |
[37.7835871999971715, -122.5247187000021967], | |
[37.8151571999998453, -122.4798767000009008]]] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>Leaflet.Spin</title> | |
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" /> | |
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/spin.js/2.3.2/spin.min.js" charset="utf-8"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.Spin/1.1.0/leaflet.spin.min.js" charset="utf-8"></script> | |
<style type='text/css'> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
btv1b53095142n_f1.jpg | |
tiled/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Execute in the PyQGIS console | |
def showXY(p): | |
print(p.x(), p.y()) | |
currentCanvas = iface.mapCanvas() | |
currentCanvas.xyCoordinates.connect(showXY) | |
# Below enable to "unregister" listening to click event | |
# currentCanvas.xyCoordinates.disconnect(showXY) |