Skip to content

Instantly share code, notes, and snippets.

@Flowm
Flowm / autossh.service.j2
Created October 20, 2017 14:50
Reconnecting SSH systemd service for persistent ssh tunnels
[Unit]
Description=AutoSSH service
After=network-online.target
[Service]
User={{ fwdc_local_user }}
ExecStart=/usr/bin/ssh -N -T -q -o ServerAliveInterval=15 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes {{ fwdc_remote_ip }} -l {{ fwdc_remote_user }} -p {{ fwdc_remote_port }} -i {{ fwdc_local_keypath }}
{%- for item in fwdc_fwd_remote %} -R {{ item.remote_ip }}:{{ item.remote_port }}:{{ item.local_ip }}:{{ item.local_port }}{% endfor %}
{%- for item in fwdc_fwd_local %} -L {{ item.local_ip }}:{{ item.local_port }}:{{ item.remote_ip }}:{{ item.remote_port }}{% endfor %}
@Flowm
Flowm / parse-pdf-annotations.py
Created April 30, 2018 00:15
Parse and extract pdf annotations with python and poppler
#!/usr/bin/env python2
# From https://stackoverflow.com/a/12502560
# Requirements:
# sudo apt install python-poppler
import poppler
import sys
import urllib
import os
@Flowm
Flowm / info.json
Created April 22, 2020 12:26
TileJSON.io - S2 tiles comparision
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
@Flowm
Flowm / info.json
Created April 22, 2020 12:28
TileJSON.io - S2 tiles comparisionS3 vs S2
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
@Flowm
Flowm / info.json
Created April 22, 2020 12:28
TileJSON.io - S2 tiles comparisionS3 vs S2S2 vs S3
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
@Flowm
Flowm / info.json
Created April 22, 2020 12:29
TileJSON.io - S2 tiles comparisionS3 vs S2S2 vs S3S2 vs S3
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},