Skip to content

Instantly share code, notes, and snippets.

Florian Baumann noqqe

View GitHub Profile
@noqqe
noqqe / identify-codeblocks.py
Last active Apr 17, 2020
Helped me to identify 1000 markdown codeblocks in my hugo blog. Syntax Highlighter was quite happy after appliying this!
View identify-codeblocks.py
#!/usr/bin/env python3
import sys
import re
import signal
f = sys.argv[1]
def signal_handler(sig, frame):
@noqqe
noqqe / maxupload.go
Last active Apr 8, 2020
Tiny HTTP Server to test MaxUploadSize behind a Loadbalancer
View maxupload.go
package main
import (
"os"
"fmt"
"bytes"
"log"
"strconv"
"net/http"
)
@noqqe
noqqe / nexus-analyze.py
Last active Nov 18, 2019
Nexus Repository Storage Space Analyzer - Takes json result from https://support.sonatype.com/hc/en-us/articles/115009519847
View nexus-analyze.py
#!/usr/bin/env python3
import sys
import json
import math
space = []
def convert_size(size_bytes):
if size_bytes == 0:
View geoconversion.R
#53 deg 54' 1.50" N - 27 deg 33' 4.92" E
# sexagonial 2 dezimal
lonsex2dec <- function(degree, minute, second) {
declon <- degree + (minute / 60) + (second / 3600)
return(declon)
}
@noqqe
noqqe / blockingheiko.py
Created Feb 20, 2019
A spike to test reading from 2 sources in parallel without blocking
View blockingheiko.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import signal
import threading
import time
def login():
k = threading.Thread(target=keyboard)
r = threading.Thread(target=rfid)
@noqqe
noqqe / instabehrliches.py
Created Dec 5, 2018
instabehrliches.py
View instabehrliches.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import html
import feedparser
import datetime
import random
import urllib.request
from PIL import Image, ImageDraw, ImageFont
@noqqe
noqqe / gpx-visualization-per-year.R
Last active May 16, 2018
Visualize each year of your Strava activities individually
View gpx-visualization-per-year.R
library(plotKML)
library(maps)
library(ggmap)
# Settings
activities_folder = "/Users/noqqe/Downloads/activities/"
output_folder = "/Users/noqqe/Downloads/"
center_map_on = "Nuremberg"
zoom_depth = 8 # 1 - 21
routes_color = "#FF000022"
@noqqe
noqqe / get_wifi_hosts.py
Last active Jan 20, 2018
Query Ubiquiti Picostation for active Wifi Hosts
View get_wifi_hosts.py
import requests
import warnings
import json
warnings.filterwarnings('ignore', 'Unverified HTTPS request')
loginurl='https://192.168.178.X/login.cgi'
s = requests.Session()
@noqqe
noqqe / gpx-visualization.R
Created May 3, 2017
Visualize gpx tracks from a folder on a picture from google maps.
View gpx-visualization.R
library(plotKML)
library(maps)
library(ggmap)
# Settings
activities_folder = "/Users/noqqe/Downloads/activities/"
center_map_on = "Plech"
zoom_depth = 9 # 1 - 21
routes_color = "#FF000022"
@noqqe
noqqe / isso2yaml.py
Last active Dec 31, 2016
isso2yaml for markdown blogposts
View isso2yaml.py
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
from datetime import datetime
import frontmatter
import glob
import codecs
import sqlite3 as lite
home = '/Users/noqqe/Code/noqqe.de/content/blog/'
You can’t perform that action at this time.