Skip to content

Instantly share code, notes, and snippets.

View SoftCreatR's full-sized avatar
👻
Boo!

Sascha Greuel SoftCreatR

👻
Boo!
  • Gladbeck, Germany
  • 13:40 (UTC +02:00)
View GitHub Profile
@SoftCreatR
SoftCreatR / tor-exit.csv
Last active April 25, 2024 00:12
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 / 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 / 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})$
@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 / 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',
name: Main
on: [push]
jobs:
build:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: Setup Node.js
uses: actions/setup-node@v2.4.0
@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;