Skip to content

Instantly share code, notes, and snippets.

@ruempel
ruempel / openlayers-photon.html
Created May 28, 2019 13:41
OpenLayers with Open Street Map and Photon Geocoding API Search
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers with OSM and Photon Search</title>
<link rel="stylesheet" href="https://openlayers.org/en/latest/css/ol.css"/>
<script src="https://openlayers.org/en/latest/build/ol.js"></script>
<link rel="stylesheet" href="https://viglino.github.io/ol-ext/dist/ol-ext.css"/>
<script src="https://viglino.github.io/ol-ext/dist/ol-ext.js"></script>
<style>
.ol-search ul {
@ruempel
ruempel / fullscreen.html
Created February 25, 2019 15:24
Demonstrate JavaScript fullscreen API
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fullscreen Demo</title>
<style>
html {
font-size: 20px;
}
@ruempel
ruempel / webvowl.Dockerfile
Last active February 25, 2019 15:30
Serve WebVOWL with nginx
# stage 0: download and extract
FROM alpine AS build
ENV VERSION 1.1.4
WORKDIR /webvowl
ADD http://downloads.visualdataweb.de/webvowl_$VERSION.zip webvowl.zip
RUN apk --update add unzip && unzip webvowl.zip && rm webvowl.zip
# stage 1: server static Web content
FROM nginx:alpine
COPY --from=build /webvowl/ /usr/share/nginx/html
@ruempel
ruempel / languagetool.Dockerfile
Last active February 25, 2019 15:35
LanguageTool server within Docker container based on AlpineLinux
FROM anapsix/alpine-java
ENV VERSION 4.4
ADD https://www.languagetool.org/download/LanguageTool-$VERSION.zip /LanguageTool-$VERSION.zip
RUN apk --update add unzip \
&& unzip LanguageTool-$VERSION.zip \
&& rm LanguageTool-$VERSION.zip
WORKDIR /LanguageTool-$VERSION
CMD ["java", "-cp", "languagetool-server.jar", "org.languagetool.server.HTTPServer", "--public"]
EXPOSE 8081
@ruempel
ruempel / countxmlnodes.ps1
Created February 23, 2018 08:30
Count nodes of all XML files in a directory recursively with Powershell
$totalnodescount = 0
Get-ChildItem -Recurse -Filter "*.xml" | % {
[System.Xml.XmlDocument] $document = New-Object System.Xml.XmlDocument
$document.load($_.FullName)
$nodes = $document.selectnodes("//*")
Write-Host $nodes.count nodes in $_.Name
$totalnodescount += $nodes.count
}
Write-Host Total nodes count: $totalnodescount
@ruempel
ruempel / stopmonitor.html
Last active January 30, 2018 14:42
Stop monitor for selected stops in Dresden public transport (HTML+JS installable to Android homescreen)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Stop Monitor</title>
<meta name="viewport" content="width=device-width"/>
<link rel="manifest" href="manifest.json"/>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f"
crossorigin></script>