Skip to content

Instantly share code, notes, and snippets.

@quantenschaum
quantenschaum / tile_proxy.py
Last active August 25, 2020 13:44
simple tile proxy for osmand allowing to use quadkey named tiles
View tile_proxy.py
#!/usr/bin/env python3
from flask import Flask, abort, send_file, request
from mercantile import quadkey
from requests import get
from os import makedirs
from os.path import isfile, join, dirname
cache_dir = 'cache'
# https://www.genesismaps.com/SocialMap/Index
@quantenschaum
quantenschaum / Python and other stuff.md
Last active March 26, 2019 20:27
Python and other cool stuff
View Python and other stuff.md

Python

Python is great - Batteries included! 🐍

implementations and extensions

  • CPython - the reference
  • IronPython - for the .NET Framework
  • PyPy - alternative implementation with JIT
  • Jython - Python running on Java VM
@quantenschaum
quantenschaum / ausweisapp2.sh
Created August 8, 2018 09:33
create appimage of ausweisapp2
View ausweisapp2.sh
#!/bin/bash -e
DIR="$(pwd)"
APP="$DIR/AusweisApp2"
TOOLS="$APP-Tools"
BUILD="$APP-Build"
IMAGE="$APP-Image"
git clone https://github.com/Governikus/AusweisApp2.git $APP
@quantenschaum
quantenschaum / make-software.md
Last active June 4, 2018 12:37
my little guide on how to get started with writing software
View make-software.md

Start to make software

  1. Use english language, because it's the language of the international community. There is more useful stuff out there in english than in any other language.
  2. Google is your friend! Have a question? Try googling it!

I don't want to give full explanations here, it's just a set of hints and enrty points to get you started.

There are many links in this document. Follow them and read, read, read ...

Open Source Software

@quantenschaum
quantenschaum / backup.sh
Created April 15, 2018 18:55
borg backup cron script
View backup.sh
#!/bin/bash -e
if [[ $# < 2 ]]; then
echo "usage: backup REPO check | list | PREFIX SRC [--force] [borg_opts]"
exit
fi
if [[ "$USER" != "root" ]]; then
exec sudo -H systemd-inhibit "$0" "$@"
fi
@quantenschaum
quantenschaum / kodi-setup.sh
Last active December 1, 2022 03:05
install script for kodi standalone mediacenter
View kodi-setup.sh
#!/bin/bash
# prepare a Ubuntu server minimal installation with working network using network manager
# this works on raspbian, too
apt-get install software-properties-common -y
# install KODI
add-apt-repository ppa:team-xbmc/ppa -y
apt-get update && apt-get install -y kodi xserver-xorg xinit dbus-x11 alsa-utils avahi-daemon
@quantenschaum
quantenschaum / default.conf
Created January 7, 2018 17:02
nginx default config
View default.conf
server {
listen 80 default_server;
server_name _;
# For Lets Encrypt, this needs to be served via HTTP
location /.well-known/acme-challenge/ {
root /var/www/html; # Specify here where the challenge file is placed
}
# enforce https
@quantenschaum
quantenschaum / ssl.conf
Last active January 7, 2018 16:54
nginx ssl config
View ssl.conf
# this is based on information from
# https://cipherli.st
# https://mozilla.github.io/server-side-tls/ssl-config-generator/
# https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
# https://scotthelme.co.uk/a-plus-rating-qualys-ssl-test/
# test it with https://www.ssllabs.com/ssltest/
#listen 443 ssl http2;
#listen [::]:443 ssl http2;