Skip to content

Instantly share code, notes, and snippets.

@2803media
2803media / parcelles.geojson
Last active December 8, 2022 00:44
parcelles
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@2803media
2803media / webp
Last active February 13, 2025 00:09
convert webp
#une image
cwebp -q 80 road.jpg -o road.webp
#toutes les images d'un dossier
find . \( -iname "*.jpg" -o -iname "*.jpeg" \) -print0 | xargs -0 -n 1 -P 0 -I '{}' cwebp -short -q 80 '{}' -o '{}'.webp
#resize d'une image
sips -Z 1280 road.jpg
@2803media
2803media / app.config.sample
Last active May 28, 2020 08:58
openrouteservices docker map isochrone
{
"ors": {
"info": {
"base_url": "https://openrouteservice.org/",
"support_mail": "[email protected]",
"author_tag": "openrouteservice",
"content_licence": "LGPL 3.0"
},
"services": {
"matrix": {
@2803media
2803media / class-faqs-shortcode.php
Created May 20, 2020 13:56
class-faqs-shortcode.php
<?php
/**
* The public-facing functionality of the plugin.
*/
if ( ! class_exists( 'FAQs_Shortcode' ) ) {
class FAQs_Shortcode {
/**
* Is shortcode being used or not
@2803media
2803media / class-faqs-shortcode.php
Last active November 15, 2019 22:21
class-faqs-shortcode.php
<?php
/**
* The public-facing functionality of the plugin.
*/
if ( ! class_exists( 'FAQs_Shortcode' ) ) {
class FAQs_Shortcode {
/**
* Is shortcode being used or not
# Fail2Ban configuration file
#
# Regexp to catch known spambots and software alike. Please verify
# that it is your intent to block IPs which were driven by
# above mentioned bots.
[Definition]
badbotscustom = \bQwantify\b|\bCFNetwork\b
@2803media
2803media / optimize.txt
Created October 10, 2018 17:52
optimize image jpg png
jpegoptim -t --all-progressive --strip-all *.jpg
find . -iname "*.png" -exec optipng -o5 -strip all {} \;
@2803media
2803media / outTurf.js
Created October 9, 2018 11:34
outTurf.js
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.turf = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var meta_1 = require("@turf/meta");
// Note: change RADIUS => earthRadius
var RADIUS
@2803media
2803media / Leaflet.VectorGrid.bundled.min2.js
Created September 19, 2018 13:17
Leaflet.VectorGrid.bundled.min2.js
(function () {
'use strict';
function __$strToBlobUri(str, mime, isBinary) {try {return window.URL.createObjectURL(new Blob([Uint8Array.from(str.split('').map(function(c) {return c.charCodeAt(0)}))], {type: mime}));} catch (e) {return "data:" + mime + (isBinary ? ";base64," : ",") + str;}}
(function(self) {
'use strict';
if (self.fetch) {
return
}
@2803media
2803media / WebWorker.js
Created September 19, 2018 13:14
WebWorker.js
'use strict';
var simplify_1 = simplify$1;
// calculate simplification data using optimized Douglas-Peucker algorithm
function simplify$1(points, tolerance) {
var sqTolerance = tolerance * tolerance,
len = points.length,