Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block yolabingo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5a32c27229f9e9a347b2f62f849078fb
yolabingo / wp-email-validate-check.php
Last active Aug 8, 2019
Test Wordpress email validation regular expression
View wp-email-validate-check.php
When using a current PHP version, class-phpmailer.php:validateAddress() uses a complex regex ("pcre8") for email address validation.
PHP < 7.3 uses libpcre 8.x.
PHP 7.3 uses libpcre2 10.x.
Due to a bug in libpcre2 < 10.32-RC1,
this email regex validation fails in PHP 7.3 with PCRE_VERSION < 10.32.
yolabingo /
Last active May 6, 2019
create multiple MySQL dump files for a single (presumably large) table
#!/usr/bin/env python3
import sys
# create mysqldump commands to create multiple sql files for a single (large) table
# specify dump_file_count for desired number of files
db_host = 'HOST'
db_user = 'USER'
db_name = 'DBNAME'
db_pass = 'PASS'
yolabingo / preseed.cfg
Created Apr 3, 2018
Debian preseed.cfg example
View preseed.cfg
=========== preseed.cfg ==========
#### IMPORTANT NOTE - replace "strongpassword" with an actual strong
## autostart SSH install
d-i debian-installer/country string AU
d-i debian-installer/locale string en_AU.UTF-8
d-i debian-installer/language string en_AU:en
### Network configuration
# d-i netcfg/disable_dhcp boolean true
yolabingo /
Last active Apr 5, 2018
purge old fail2ban bans from sqlite db
# prune sqlite db file for fail2ban v 0.9.x
# run me from cron to keep sqlite db a sane size
# fail2ban doesn't purge old entries from sqlite db, so it grows until things break
dbfile=$(fail2ban-client get dbfile | grep "\`-" | awk '{print $2}')
dbpurgeage=$(fail2ban-client get dbpurgeage | grep "\`-" | awk '{print $2}' | sed 's/seconds.*//')
yolabingo / gist:b422d3c33357518431abb3e3b82adf43
Last active Dec 9, 2017
gentoo make.conf for non-binhost apache server
View gist:b422d3c33357518431abb3e3b82adf43
CFLAGS="-march=core2 -O2 -pipe"
USE="mmx sse sse2 apache2 -gtk -gnome -kde -alsa -cups -X"
EMERGE_DEFAULT_OPTS="--autounmask=y --getbinpkg"
yolabingo / gist:c26dd4cc70518418eff9c80213882a6f
Created Dec 7, 2017
apache ErrorLog to syslog-ng snippet
View gist:c26dd4cc70518418eff9c80213882a6f
filter f_apache_error { match('^apache2' value("MSGHDR")) };
filter f_apache_error_send_email {
(message('Option') and message('not allowed here'))
filter f_apache_php_notice {
message('PHP Notice') or
message('PHP Deprecated') or
message('PHP Strict Standards')
scriptname=$(basename "$0")
for index in $(pacmd list-sink-inputs | egrep -i -B 25 "seamonkey|chrome|firefox" | grep index: | awk '{print $2}')
volume=$(pacmd list-sink-inputs | grep -A 8 "index: ${index}" | grep volume: | awk '{print $3}')
if [ $scriptname == "volume-up" ]
echo "volume up"
yolabingo /
Last active Dec 15, 2019
shell script to remove IPv4 addresses from all fail2ban jails
#!/usr/bin/env bash
function print_help {
echo "remove an ip address from all fail2ban jails"
echo "$(basename $0) ip_address [ip_address] [ip_address]"
if [[ -z "$@" ]]
from __future__ import with_statement # we'll use this later, has to be here
from argparse import ArgumentParser
import requests
from BeautifulSoup import BeautifulStoneSoup as Soup
def parse_sitemap(url):
resp = requests.get(url)
# we didn't get a valid response, bail
You can’t perform that action at this time.