Skip to content

Instantly share code, notes, and snippets.

View scysys's full-sized avatar
I may be slow to respond.

Sven scysys

I may be slow to respond.
  • Germany
  • 22:37 (UTC +02:00)
View GitHub Profile
scysys /
Created August 12, 2023 19:08
MySQL Remote Access Control Script using CSF
# MySQL Remote Access Control Script
# This script generates lists of allowed remote IP addresses for incoming and outgoing MySQL connections,
# taking into account both IPv4 and IPv6 addresses. It then updates the firewall rules using CSF.
# Usage: This script is meant to be scheduled to run periodically, e.g., using cron.
# Source:
scysys /
Created August 12, 2023 16:09
Packet Payload Modification for Network Traffic
#!/usr/bin/env python3
from netfilterqueue import NetfilterQueue
import scapy.all as scapy
# Configuration variables
original_keyword = b"search"
modified_keyword = b"replace"
def modify_packet(packet):
scapy_packet = scapy.IP(packet.get_payload())
View example_radio.dart
// This is a minimal example demonstrating live streaming.
// To run:
// flutter run -t lib/example_radio.dart
import 'package:audio_session/audio_session.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:just_audio/just_audio.dart';
scysys / gist:1a464a26d155dba560a64d13d37f6322
Created March 27, 2019 11:31
Bootstrap 4: Restore the former "hidden-*" styles known from Bootstrap 3
View gist:1a464a26d155dba560a64d13d37f6322
* Restore Bootstrap 3 "hidden" utility classes.
/* Breakpoint XS */
@media (max-width: 575px)
.hidden-xs-down, .hidden-sm-down, .hidden-md-down, .hidden-lg-down, .hidden-xl-down,
.hidden-unless-sm, .hidden-unless-md, .hidden-unless-lg, .hidden-unless-xl
scysys /
Last active August 24, 2017 13:54 — forked from xgin/
Secure Plesk installation with hostname certificate by Let's Encrypt
#!/bin/bash -e
### Copyright 1999-2015. Parallels IP Holdings GmbH. All Rights Reserved.
### Secure plesk clean installation with hostname certificate by Let's Encrypt
export PYTHONWARNINGS="ignore:Non-standard path"
# Use staging server for testing
# --server
scysys / gist:51e91e0ee858f303d3319dc16d81f897
Last active June 30, 2017 13:33
PCPIN Chat / IP filter not configured (fix)
View gist:51e91e0ee858f303d3319dc16d81f897
DROP TABLE IF EXISTS `pcpin_ipfilter`;
CREATE TABLE `pcpin_ipfilter` (
`id` int(11) NOT NULL,
`address` varchar(45) CHARACTER SET ascii NOT NULL DEFAULT '',
`added_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`description` text NOT NULL,
`action` enum('d','a') NOT NULL DEFAULT 'd',
`type` varchar(4) CHARACTER SET ascii COLLATE ascii_bin NOT NULL DEFAULT 'IPv4'
scysys / gist:c98f3efb86de92b75489
Created July 18, 2015 14:20
Wordpress String Translate
View gist:c98f3efb86de92b75489
function stringtranslate_filter_gettext( $translated, $original, $domain ) {
$strings = array(
'Post Comment' => 'Hinterlassen Sie eine Antwort',
if ( isset( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
return $translated;