Skip to content

Instantly share code, notes, and snippets.

@brunob
brunob / prettycss.conf
Last active April 26, 2019 08:42
Personal config file for PrettyCSS https://github.com/fidian/PrettyCSS/
{
"cssLevel": 3,
"autocorrect": "",
"propertiesLowerCase": "",
"valuesLowerCase": "",
"at_pre": "",
"at_whitespace": " ",
"at_post": "\n",
"atblock_pre": " {\n\t",
"atblock_post": "\r}",
@brunob
brunob / 2019_09_07.json
Last active September 25, 2019 12:13
Boat animated track - 2019_09_07
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brunob
brunob / 2019_08_31.json
Last active September 25, 2019 12:14
Boat animated track - 2019_08_31
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brunob
brunob / backup.sh
Last active December 4, 2019 09:52
backup geodiv v2020
#!/bin/bash
# Generation des dates
date=$(date +%Y%m%d)
old=$(date +%Y%m%d -d '8 days ago')
###
# Pamrametres du script
###
<style type="text/css">
@media (min-width:576px){[class*=" grid-"],[class^=grid-]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}[class*=" grid-"]>*,[class^=grid-]>*{-webkit-box-sizing:border-box;box-sizing:border-box;min-width:0;min-height:0}}@media (min-width:576px){.grid,.grid--reverse{display:-webkit-box;display:-ms-flexbox;display:flex}.grid--reverse>*,.grid>*{-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%;-webkit-box-sizing:border-box;box-sizing:border-box;min-width:0;min-height:0}.grid--reverse.has-gutter>*+*,.grid.has-gutter>*+*{margin-left:calc(1rem - .01px)}.grid--reverse.has-gutter-l>*+*,.grid.has-gutter-l>*+*{margin-left:calc(2rem - .01px)}.grid--reverse.has-gutter-xl>*+*,.grid.has-gutter-xl>*+*{margin-left:calc(4rem - .01px)}}@media (min-width:576px){[class*=grid-2]>*{width:calc(100% / 2 - .01px)}[class*=grid-2].has-gutter{margin-right:-.5rem;margin-left:-.5
@brunob
brunob / togeo.py
Created July 28, 2021 18:18 — forked from tmcw/togeo.py
geo-assign any arbitrary image to a geotiff usable in tilemill
import subprocess
import sys, re
MERC = '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs'
infile = sys.argv[1]
info_output = subprocess.Popen(['gdalinfo', infile], stdout=subprocess.PIPE).communicate()[0]
size_is_re = re.compile('Size is (?P<width>\d+), (?P<height>\d+)')
size_is = [x for x in [size_is_re.match(x) for x in info_output.decode().split('\n')] if x]
@brunob
brunob / index.html
Last active February 28, 2022 15:06
<!DOCTYPE html>
<html>
<head>
<title>Leaflet svgOverlay</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" crossorigin="" />
<style>
html, body, #map { width: 100%; height: 100%; margin: 0; }
</style>