Skip to content

Instantly share code, notes, and snippets.

View Hades32's full-sized avatar
😬

Martin Rauscher Hades32

😬
View GitHub Profile
@Hades32
Hades32 / Vector.svg
Created January 10, 2024 15:12
Fancy SVG box
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Hades32
Hades32 / Dockerfile
Last active June 23, 2022 10:38
Fast SVG rendering with Go binding
FROM golang:1.18
RUN apt update && apt install -y librsvg2-dev && apt-get clean
WORKDIR /go/playground
COPY . .
RUN go build
@Hades32
Hades32 / 01-setup-system.network.sh
Created April 12, 2020 08:05
Grafana+Prometheus for home network monitoring
#!/bin/bash
docker network create mynet
useradd --system container-user
mkdir -p /data/prom/config/ /data/prom/data/ /data/grafana/data/ /data/meshping/redis/
chown -R container-user /data/prom/config/ /data/prom/data/ /data/grafana/data/ /data/meshping/redis/
@Hades32
Hades32 / fail.js
Created January 18, 2020 14:06
vodafone station endless loop
for(i=0 ; i<getdata['StaticNHostTable'].length ; i++) {
if(index != null) {
if(index == i) {
tt.find('span.inner-dropbox').text(getdata['StaticNHostTable'][i]['HostName']);
MAC = (getdata['StaticNHostTable'][i]['MAC']).split(":");
IP = (getdata['StaticNHostTable'][i]['IP']).split(".");
for(j=0; j<6; j++){
tt.find('.extra_mac_address'+(j+1)).text(MAC[j]);
}
@Hades32
Hades32 / kill.sh
Last active April 30, 2020 09:13
Instant k3s cluster on Scaleway
#!/bin/bash
set -euo pipefail
server_name=$1
region=${2:-"par1"}
function fix_scw {
# there is currently a bug in scw that causes failures when (re)using servernames with '-' in it
rm ~/.scw-cache.db || true
}
@Hades32
Hades32 / main.go
Created October 19, 2019 22:36
Azure EventHub with Go experiment
package main
// MIT License
//
// Copyright (c) Martin Rauscher. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@Hades32
Hades32 / JwtSecurityConfig.kt
Created November 12, 2018 00:21
Handling JWT Validation with only RSA X.509 Public Key
package mn.max
import io.micronaut.context.annotation.Value
import io.micronaut.security.token.jwt.signature.rsa.RSASignatureConfiguration
import java.security.KeyFactory
import java.security.interfaces.RSAPublicKey
import java.security.spec.X509EncodedKeySpec
import java.util.*
import javax.inject.Named
import javax.inject.Singleton
@Hades32
Hades32 / fizzlefade.html
Last active December 30, 2017 13:51 — forked from edco/fizzlefade.html
add possibility to break (obvious) determinism
<!DOCTYPE html>
<html>
<head><title>Javascript RT</title></head>
<style>canvas {width: 1280px; height: 768px}</style>
<body>
<canvas id="framebuffer"></canvas>
<script type="text/javascript">
/* Fizzlefade using a Feistel network.
@Hades32
Hades32 / run.sh
Last active August 25, 2017 17:58
Start a docker container with environment variables for external port and IP
#!/bin/bash
#Start a docker container with environment variables for external port and IP
if [ -z $1 ]
then
echo pass in starting port
exit 1
fi
START_PORT=$1
@Hades32
Hades32 / elixir-npp.xml
Created October 14, 2014 18:46
Simple syntax highlighting for Elixir for Notepad++
<NotepadPlus>
<UserLang name="Elixir" ext="ex exs" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="yes" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02 03/* 04*/</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>