Skip to content

Instantly share code, notes, and snippets.

View noqqe's full-sized avatar
😴

Florian Baumann noqqe

😴
View GitHub Profile
@noqqe
noqqe / show-docker-ports.py
Created May 9, 2022 14:30
Shows ports that are used for your nexus instances docker repos
#!/usr/bin/env python3
# Usage
# ./show-docker-ports.py https://adminuser:[email protected]
import sys
import json
import requests
base_url=sys.argv[1]
@noqqe
noqqe / laschomat.go
Created April 7, 2021 15:14
Armin Laschet denkt über Ostern nach.
package main
import (
"fmt"
"math/rand"
"time"
)
var number = []string{
"ein-",
@noqqe
noqqe / identify-codeblocks.py
Last active April 17, 2020 13:27
Helped me to identify 1000 markdown codeblocks in my hugo blog. Syntax Highlighter was quite happy after appliying this!
#!/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 April 8, 2020 13:38
Tiny HTTP Server to test MaxUploadSize behind a Loadbalancer
package main
import (
"os"
"fmt"
"bytes"
"log"
"strconv"
"net/http"
)
@noqqe
noqqe / nexus-analyze.py
Last active November 18, 2019 15:22
Nexus Repository Storage Space Analyzer - Takes json result from https://support.sonatype.com/hc/en-us/articles/115009519847
#!/usr/bin/env python3
import sys
import json
import math
space = []
def convert_size(size_bytes):
if size_bytes == 0:
#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 February 20, 2019 06:27
A spike to test reading from 2 sources in parallel without blocking
#!/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 December 5, 2018 11:14
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 15:12
Visualize each year of your Strava activities individually
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 January 20, 2018 09:40
Query Ubiquiti Picostation for active Wifi Hosts
import requests
import warnings
import json
warnings.filterwarnings('ignore', 'Unverified HTTPS request')
loginurl='https://192.168.178.X/login.cgi'
s = requests.Session()