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 / mxClasses.R
Last active September 24, 2015 07:11
map-x layer classes and subclasses
mxConfig$class = list(
"Development" = "dev",
"Environment" = "env",
"Extractives" = "ext",
"Stresses" = "str"
)
mxConfig$subclass = list(
"dev" = list(
"Unemployment" = "unemployment",
@fxi
fxi / postfix_part.sh
Created February 15, 2016 14:31
postfix config for vagrant ubuntu machine
if [[ ! -e $dirReceipts/postfix ]]
then
# doc found on
# https://www.linode.com/docs/email/postfix/postfix-smtp-debian7
# https://www.howtoforge.com/postfix_relaying_through_another_mailserver
export DEBIAN_FRONTEND=noninteractive
apt-get -qy purge mailutils postfix
apt-get install -qy postfix mailutils
# var
mailadmin="[email protected]"
@fxi
fxi / rToSld.R
Last active April 27, 2016 12:34
raster color table to sld
library(raster)
library(XML)
# get raster file
# e.g. read from file:
r <- raster("dat.tif")
# create sample values
r <- raster(ncol=10, nrow=10)
r[] <- as.integer(runif(length(r))*255)
# demonstration de tryCatch
# exemple minimal
tryCatch(stop("yo"),error=function(cond){print(cond$message)})
# exemple en téléchargeant un fichier
superTest <- function(){
@fxi
fxi / README.md
Last active May 2, 2017 14:17
Drop multiple geojson files on a mapbox gl js map

Experimental work with mapbox gl js, web workers and geojsonhint to create new layers by drag and dropping geojson data.

@fxi
fxi / index.html
Last active September 13, 2016 10:33
search list js
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Search js list</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<meta http-equiv="cache-control" content="Public">
<link href="js_search.css" type="text/css" rel="stylesheet">
</head>
<body>
@fxi
fxi / README.md
Last active April 18, 2019 15:48
Experimental work on forked computation in shiny app using the package "parallel".

Shiny asynchronous jobs

Experiemental work on forked computation in shiny app using the package "parallel".

Does not work on windows.

Example

@fxi
fxi / .block
Last active May 10, 2017 09:47
fresh block
license: mit
@fxi
fxi / index.html
Created June 27, 2017 08:27 — forked from diethardsteiner/index.html
Simple D3JS Dashboard
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Testing Pie Chart</title>
<!--<script type="text/javascript" src="d3/d3.v2.js"></script>-->
<script src="https://d3js.org/d3.v2.js"></script>
<!-- Note: I made good use of the sample code provided by the D3JS community and extended it to fit my needs to create this simple dashboard -->
<style type="text/css">
@fxi
fxi / index.html
Last active February 10, 2020 18:06
Update highcharts with data from mapbox gl
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.38.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.38.0/mapbox-gl.css' rel='stylesheet' />
<link href='style.css' rel='stylesheet' />
<script src="https://code.highcharts.com/highcharts.src.js"></script>