Skip to content

Instantly share code, notes, and snippets.

View fxi's full-sized avatar
🚀
Learning new things.

F.Moser fxi

🚀
Learning new things.
View GitHub Profile
@fxi
fxi / test.svg
Created September 21, 2017 08:46
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fxi
fxi / test.svg
Created September 27, 2017 09:10
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fxi
fxi / docker-cluster-create.sh
Last active June 14, 2020 02:47
Create a "simple" docker swarm cluster : 1 data node, 1 master node, 2 workers
#!/bin/bash
set -e
#
# Create a cluster of workers on exoscale, sharing a common data folder using a NFS exports.
# (not battle tested)
#
# BASED ON THE ENTIRE WEB and those sources
# https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-16-04
@fxi
fxi / index.html
Last active July 12, 2018 13:46
Test MapX
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>MapX tests</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
body,
@fxi
fxi / index.html
Last active February 1, 2019 11:27
Experimental travel time surface without server
<!DOCTYPE html>
<html>
<head>
<style>
* {
font-family: helvetica, sans;
}
</style>
</head>
<body>
@fxi
fxi / animate_raster_layers.js
Created February 20, 2019 11:02
Custom code to animate a serie of images in MapX custom code view
/**
* Custom method for custom view in map-x
* Parameters for onInit and onClose function ;
* @param {Object} o Options
* @param {Object} o.view Map-x view object
* @param {Object} o.map mapbox-gl map object
* @param {String} o.idView If of the view
* @param {String} o.idSource Id of the source
* @param {Element} o.elLegend Element containing the legend
*
@fxi
fxi / custom_code.js
Last active February 21, 2019 13:56
Cycle through WMS sources in MapX custom code view
/**
* Custom method for custom view in map-x
* Parameters for onInit and onClose function ;
* @param {Object} o Options
* @param {Object} o.view Map-x view object
* @param {Object} o.map mapbox-gl map object
* @param {String} o.idView If of the view
* @param {String} o.idSource Id of the source
* @param {Element} o.elLegend Element containing the legend
*
@fxi
fxi / metadeta.json
Last active March 5, 2019 15:23
Example of MapX metadata schema and metadata for a specific source
{
"text": {
"title": {
"en": "Artisanal Mines Sites 2015",
"fr": "",
"es": "",
"ru": "",
"zh": "",
"de": "",
"bn": "",
/**
* Custom method for custom view in MapX
* Parameters for onInit and onClose function ;
* @param {Object} o Options
* @param {Object} o.view Map-x view object
* @param {Object} o.map mapbox-gl map object
* @param {String} o.idView If of the view
* @param {String} o.idSource Id of the source
* @param {Element} o.elLegend Element containing the legend
*
@fxi
fxi / app.R
Last active October 13, 2020 10:10
library(shiny)
source('helper.R')
ui = fluidPage(
plotOutput("i"),
sliderInput(
"s",
"range",
min = 0,
max = 1000,