Skip to content

Instantly share code, notes, and snippets.

View fvanderbiest's full-sized avatar

François Van Der Biest fvanderbiest

View GitHub Profile
@pmauduit
pmauduit / settings.xml
Created January 14, 2019 12:34
m2 settings
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>artifactory-georchestra</id>
<mirrorOf>*</mirrorOf>
<url>https://packages.georchestra.org/artifactory/maven</url>
</mirror>
@cmangeat
cmangeat / clean_ghost_ldap_users.py
Last active August 7, 2018 11:59
remove non existent users form roles
from ldap3 import Connection, SUBTREE, MODIFY_DELETE
from ldap3.core.exceptions import LDAPException
LDAP_URI = 'ldap://localhost:3899'
BIND_WITH_CREDENTIALS = True
LDAP_BINDDN = 'cn=admin,dc=georchestra,dc=org'
LDAP_PASSWD = 'secret'
USERS_DN = 'ou=users,dc=georchestra,dc=org'
ROLES_DN = 'ou=roles,dc=georchestra,dc=org'
@mdouchin
mdouchin / PostGIS_create_missing_spatial_indexes.sql
Last active June 16, 2020 21:09
PostGIS - Function to create missing spatial indexes in your whole database
-- Allow to list all layers with no spatial index
-- To get the list
-- SELECT * FROM create_missing_spatial_indexes(True);
-- To create automatically the missing spatial indexes
-- SELECT * FROM create_missing_spatial_indexes(False);
DROP FUNCTION IF EXISTS create_missing_spatial_indexes();
DROP FUNCTION IF EXISTS create_missing_spatial_indexes( BOOLEAN );
CREATE OR REPLACE FUNCTION create_missing_spatial_indexes(simulate BOOLEAN DEFAULT FALSE)
RETURNS TABLE (
@pmauduit
pmauduit / writeup.MD
Last active November 23, 2017 09:56
Codesprint SOS

Introduction

Codesprint définissant 2 groupes de travail:

  • Documentation
  • Analyse / état de l'Art, et proposition de PoC autour de geOrchestra et SOS

Etat de l'art

Nous sommes partis d'un document de travail de Rennes-Métropole, mis à jour en

@pmauduit
pmauduit / config
Last active March 31, 2016 18:30
LXC cheat sheet
lxc.utsname = cont1
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0
lxc.network.name = eth0
lxc.network.ipv4 = 192.168.0.2/24
lxc.network.ipv4.gateway = 192.168.0.1
lxc.rootfs = /var/lib/lxc/cont1/rootfs
@zhujunsan
zhujunsan / Using Github Deploy Key.md
Last active May 6, 2024 04:53
Using Github Deploy Key

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
@klokan
klokan / Dockerfile
Created January 29, 2015 01:13
GDAL in Docker - stable GDAL with JP2KAK, MRSID and ECW: https://registry.hub.docker.com/u/klokantech/gdal/
FROM debian:7
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -qq update \
&& apt-get -qq -y --no-install-recommends install \
autoconf \
automake \
build-essential \
curl \
@pmauduit
pmauduit / geohealthcheck.wsgi
Created October 24, 2014 09:05
Flask sample WSGI file for geohealthcheck
activate_this = '/var/www/pmauduit/private/GeoHealthCheck/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
import sys
sys.stdout = sys.stderr
sys.path.insert(0, '/var/www/pmauduit/private/GeoHealthCheck/GeoHealthCheck/GeoHealthCheck')
from app import APP as application
@kminiatures
kminiatures / gist:4f314baeb9cf6e0977ea
Last active September 10, 2018 11:51
munin temperature plugin. for Raspberry Pi and DS18B20
#!/bin/sh
case $1 in
config)
cat <<'EOM'
graph_title Temperature
graph_vlabel Temperature
temperature.label temperature
EOM
exit 0;;
@danriti
danriti / fdups.py
Last active April 1, 2016 11:53 — forked from miku/fdups.py
# http://stackoverflow.com/questions/748675/finding-duplicate-files-and-removing-them/748908#748908
import sys
import os
import mmh3
CHUNK_SIZE = 1024*1024
def check_for_duplicates(paths):