View mysql_in_out.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### | |
# 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: https://gist.github.com/scysys/21994b8ec478c799fbdbbbd1ac5fb58c |
View modify_network.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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'; |
View gist:1a464a26d155dba560a64d13d37f6322
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*\ | |
* 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-xs-up, | |
.hidden-unless-sm, .hidden-unless-md, .hidden-unless-lg, .hidden-unless-xl |
View letsencrypt-hostname.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" | |
LE_HOME=${LE_HOME:-"/usr/local/psa/var/modules/letsencrypt"} | |
HOSTNAME=$(hostname) | |
# Use staging server for testing | |
# --server https://acme-staging.api.letsencrypt.org/directory |
View gist:51e91e0ee858f303d3319dc16d81f897
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0; |
View gist:c98f3efb86de92b75489
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |