Skip to content

Instantly share code, notes, and snippets.

View SoftCreatR's full-sized avatar
👻
Boo!

Sascha Greuel SoftCreatR

👻
Boo!
  • Gladbeck, Germany
  • 17:40 (UTC +02:00)
View GitHub Profile
@SoftCreatR
SoftCreatR / tor-exit.csv
Last active May 5, 2024 00:11
Tor exit nodes geo data
IP Network Prefix ASN Organization City Name Continent Code Continent Name Country ISO Code Country Name Is Country in European Union Location Accuracy Radius Location Latitude Location Longitude Location Time Zone Postal Code Registered Country ISO Code Registered Country Name Is Registered Country in European Union Subdivision ISO Code Subdivision Name
2a0a:4cc0:0000:0099:c44b:7eff:fe23:de3d 2a0a:4cc0:0:99:c44b:7eff:fe23:de3d/64 197540 "netcup GmbH" Vienna EU Europe AT Austria true 20 48.1951 16.3483 Europe/Vienna 1060 DE Germany true 9 Vienna
2a0a:4cc0:0001:0101:a463:1eff:fee1:4874 2a0a:4cc0:1:101:a463:1eff:fee1:4874/64 197540 "netcup GmbH" Vienna EU Europe AT Austria true 20 48.1951 16.3483 Europe/Vienna 1060 DE Germany true 9 Vienna
2a0a:4cc0:0003:00c6:887f:3dff:feab:e676 2a0a:4cc0:3:c6:887f:3dff:feab:e676/64 197540 "netcup GmbH" Vienna EU Europe AT Austria true 20 48.1951 16.3483 Europe/Vienna 1060 DE Germany true 9
@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 <hello@1-2.dev> #
# Date : 2021-03-30 09:30 #
@SoftCreatR
SoftCreatR / blurhash.js
Last active November 10, 2023 13:10
Strapi 4 Blurhash
// ./src/extensions/blurhash.js
const plaiceholder = require('plaiceholder')
const _ = require('lodash')
module.exports = {
generatePlaceholder (strapi) {
strapi.contentType('plugin::upload.file').attributes.placeholder = {
type: 'text'
}
@SoftCreatR
SoftCreatR / README.md
Last active February 13, 2023 09:11
RFC 2822 Regex PHP example

EmailValidator Class

The ScEmailValidator class provides a static method for validating email addresses using a regular expression.

The regular expression used by this class is based on the pattern defined in RFC 2822 for email addresses. The regular expression is designed to match a wide range of valid email addresses, including email addresses with domain names that contain IP addresses, internationalized domain names (IDNs), and new top-level domain names. The regular expression also supports email addresses with local parts that contain special characters, such as periods, plus signs, and quoted strings.

@SoftCreatR
SoftCreatR / helpers.css
Created January 29, 2018 23:18
CSS Helper Classes
.no-p {
padding: 0px !important
}
.no-p-t {
padding-top: 0px !important
}
.no-p-r {
padding-right: 0px !important
@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 / fake-speedtest.php
Created September 18, 2021 11:29
Generate Fake Stats for speedtest.net
<?php
$down = (!empty($_GET['down']) ? (int)$_GET['down'] : mt_rand(1000, 5000)) * 1000;
$up = (!empty($_GET['up']) ? (int)$_GET['down'] : mt_rand(1000, 5000)) * 1000;
$ping = !empty($_GET['ping']) ? (int)$_GET['ping'] : mt_rand(0, 20);
$server = !empty($_GET['server']) ? (int)$_GET['server'] : 6601; // https://c.speedtest.net/speedtest-servers-static.php
$accuracy = 8;
$headers = [
'POST /api/api.php HTTP/1.1',
[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[]
@SoftCreatR
SoftCreatR / settings.json
Last active July 11, 2022 00:23
Windows Terminal Stuff
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
@SoftCreatR
SoftCreatR / gist:303513be9b85f83a2819443fa7b422f3
Created April 15, 2022 21:23
Date Regex (dd.mm.yyyy) incl. leap years, etc.
^(?:(?:31\.(?:0?[13578]|1[02]))\.|(?:(?:29|30)\.(?:0?[13-9]|1[0-2])\.))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29\.0?2\.(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])\.(?:(?:0?[1-9])|(?:1[0-2]))\.(?:(?:1[6-9]|[2-9]\d)?\d{2})$