Skip to content

Instantly share code, notes, and snippets.

View mpfeil's full-sized avatar
🏠
Working from home

Matthias Pfeil mpfeil

🏠
Working from home
View GitHub Profile
@mpfeil
mpfeil / senseBox-PM.ino
Last active October 25, 2023 07:49
senseBox:home V1 WiFi Sketch
/*
senseBox:home - Citizen Sensingplatform
Version: wifi_1.4
Date: 2017-07-29
Homepage: https://www.sensebox.de https://www.opensensemap.org
Author: Institute for Geoinformatics, University of Muenster
Note: Sketch for senseBox:home WiFi with dust particle upgrade
Model: homeWifiFeinstaub
Email: support@sensebox.de
Code is in the public domain.
@mpfeil
mpfeil / download.js
Created July 10, 2023 13:57
openSenseMap Archive Downloader
const fs = require('fs');
const https = require('https');
const fetch = require('node-fetch');
const dayjs = require('dayjs');
let START_DATE = dayjs('2023-01-01');
const END_DATE = dayjs().subtract(1, 'day');
const API_URL = 'https://api.opensensemap.org';
@mpfeil
mpfeil / gist:9f7d5cd46fd279912b65d9621a340ff6
Created December 9, 2022 10:35
openSenseMap TTN Payload Formatter JSON
function Decoder(bytes, port) {
// bytes is of type Buffer.
'use strict';
var AQUASCOPE_ID;
// Über den Port könnte man mehrere openSenseMap Boxes anbinden
switch (port) {
case 1:
AQUASCOPE_ID = 'OPENSENSEMAP_SENSOR_ID';
// Hier könnten auch noch mehrere Sensoren hinzugefügt werden
@mpfeil
mpfeil / sites.json
Last active December 3, 2021 10:47
Sites JSON
[
{"TYPE":"SINGLE","ACTIVE":"YES","SITECODE":"TEST1","SITENAME":"JRC Test","LOGO":["logo1.jpg"],"EMAIL":["JRC-CtizenSData@ec.europa.eu"],"LINK":["https://ec.europa.eu"],"coordinates":[[[8.6233682,45.8085722,0],[8.6238952,45.8074195,0],[8.624365,45.8069257,0],[8.6257681,45.8063122,0],[8.6266187,45.8056463,0],[8.6292502,45.8034846,0],[8.630067,45.8035061,0],[8.6304754,45.8034495,0],[8.6330077,45.8049918,0],[8.6349927,45.8052096,0],[8.6358565,45.8053559,0],[8.6362884,45.8056384,0],[8.6365056,45.8052553,0],[8.6368973,45.8054143,0],[8.6373962,45.8056929,0],[8.6377557,45.8055078,0],[8.638429,45.8062455,0],[8.6390016,45.8065545,0],[8.6394882,45.808202,0],[8.6406256,45.8082433,0],[8.6408188,45.8087351,0],[8.6416556,45.809168,0],[8.642074,45.8089657,0],[8.6424898,45.8091956,0],[8.6427942,45.8095274,0],[8.6428626,45.8101584,0],[8.6424414,45.8104107,0],[8.6419304,45.8105069,0],[8.6415461,45.8109813,0],[8.6416544,45.8113007,0],[8.6420841,45.8114514,0],[8.6421062,45.8116769,0],[8.6419144,45.8122176,0],[8.6411659,45.81285
@mpfeil
mpfeil / wifi_webserver_sdcard.ino
Created July 25, 2019 15:25
Arduino Sketch for senseBox:edu containing a webserver that displays data from a sd card.
/*
WiFi Web Server Read SD Card
A simple web server that reads data from a SD card and displays
it.
This example combines the following Arduino examples and is
for a senseBox:edu with WiFi and SDCard Bee.
https://www.arduino.cc/en/Tutorial/Wifi101WiFiWebServer

Keybase proof

I hereby claim:

  • I am mpfeil on github.
  • I am mapf (https://keybase.io/mapf) on keybase.
  • I have a public key ASBIYeT6a1x0ATm7-DCwlsWMWrS30NpXkvZstemMVdlfWwo

To claim this, I am signing this object:

@mpfeil
mpfeil / index.html
Last active August 29, 2015 14:02
CSS class for horizontal leaflet-bar
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Vertical Control Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
@mpfeil
mpfeil / index.html
Created March 13, 2014 18:02
Leaflet BoundingBox Sample
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>BoundingBox</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<style type="text/css">
body { margin:0; padding:0; }