Skip to content

Instantly share code, notes, and snippets.

View SoftCreatR's full-sized avatar
👻
Boo!

Sascha Greuel SoftCreatR

👻
Boo!
  • Gladbeck, Germany
  • 08:02 (UTC +02:00)
View GitHub Profile
@SoftCreatR
SoftCreatR / teamspeak-badges-regex.txt
Last active September 11, 2021 03:49
Teamspeak Badges Regex
// https://badges-content.teamspeak.com/list
\$(?P<ID>[\w\d-]+).(.|\n)(?P<Title>.+)..(?P<URL>https:\/\/[\w\-\.\/]+)..(?P<Desc>[^\(]*)
@SoftCreatR
SoftCreatR / server.py
Created August 5, 2021 03:24
Simple Python3 (HTTPs) Server for a static website, including security headers for A+ rating
"""
Copyright (c) 2021 1-2.dev
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
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
(document => {
let checkCount = 0,
formatFound = false;
const setHTMLClass = (height, className) => {
checkCount += 1;
if (parseInt(height, 10) === 2) {
formatFound = true;
@SoftCreatR
SoftCreatR / update-hcfw.sh
Last active January 1, 2024 12:36
Hetzner Cloud Firewall Cloudflare IP Updater using either curl, wget or httpie.
#!/usr/bin/env bash
##############################################################
# Title : Hetzner Firewall Cloudflare IP Updater #
# Description : Allows you to update your Hetzner Cloud #
# Firewall to allow all incoming requests #
# from Cloudflare. #
# #
# Author : Sascha Greuel <[email protected]> #
# Date : 2021-03-30 09:30 #
@SoftCreatR
SoftCreatR / README.md
Last active March 3, 2021 22:07
Just Eat Takeaway / Lieferando (DACH) / Eat.ch / Thuisbezorgd.nl / Pyszne.pl - Shadow Website Domains
@SoftCreatR
SoftCreatR / _ipinfo.conf
Last active May 30, 2021 15:01
IP Address Information in pure nginx, using GeoIP2, JSON Var Module and some mapping magic.
#####
# IPInfo Host configuration
#
# Source: https://gist.github.com/SoftCreatR
#
# Requires:
# - ngx_http_json_var_module (https://github.com/SoftCreatR/nginx-json-var-module)
# - geoip2.conf (see below)
#####
@SoftCreatR
SoftCreatR / Dockerfile
Last active October 1, 2022 16:07
php-8.0.1-fpm-alpine3.12-imagick
ARG NAME_IMAGE_BASE='php'
ARG NAME_IMAGE_TAG='8.0.1-fpm-alpine3.12'
FROM ${NAME_IMAGE_BASE}:${NAME_IMAGE_TAG}
ARG ID_BUILD='build-20210118'
ARG VERSION_PHP='8.0.1-imagick'
ARG VERSION_OS='3.12.0'
ARG IMAGICK_COMMIT='448c1cd0d58ba2838b9b6dff71c9b7e70a401b90'
@SoftCreatR
SoftCreatR / install-appwrite.sh
Last active October 15, 2020 13:30
Simple install script for Appwrite Backend Server (https://appwrite.io)
#!/usr/bin/env bash
while [ "$#" -gt 0 ]; do
case "$1" in
--no-docker)
WITH_DOCKER="no"
;;
--no-docker-compose)
WITH_DOCKER_COMPOSE="no"
;;
@SoftCreatR
SoftCreatR / build.bat
Last active September 29, 2020 21:29
Windows Build Script for WoltLab Suite packages using 7zip
@ECHO OFF
goto :start
MIT License
Copyright (c) 2020 Sascha Greuel <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@SoftCreatR
SoftCreatR / hashBrowser.js
Created June 5, 2019 09:36
Creates a hash for a value using the SHA-256 algorithm. Returns a promise. Use the SubtleCrypto API to create a hash for the given value.
const hashBrowser = val =>
crypto.subtle.digest('SHA-256', new TextEncoder('utf-8').encode(val)).then(h => {
let hexes = [],
view = new DataView(h);
for (let i = 0; i < view.byteLength; i += 4)
hexes.push(('00000000' + view.getUint32(i).toString(16)).slice(-8));
return hexes.join('');
});
hashBrowser(JSON.stringify({ a: 'a', b: [1, 2, 3, 4], foo: { c: 'bar' } })).then(console.log);