Skip to content

Instantly share code, notes, and snippets.

View Moqume's full-sized avatar

Mike Green Moqume

View GitHub Profile
@Moqume
Moqume / etc_garbd
Created November 24, 2012 23:24
garbd (Galera Arbitrator) init script
GARBD_ADDRESS="gcomm://192.168.1.2"
GARBD_GROUP="my_snazzy_cluster"
@Moqume
Moqume / extra
Created September 16, 2013 17:02
Grok IPv6 Pattern (Logstash)
IP6 (?:([0-9A-Fa-f]{1,4}:([0-9A-Fa-f]{1,4}:([0-9A-Fa-f]{1,4}:([0-9A-Fa-f]{1,4}:([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{0,4}|:[0-9A-Fa-f]{1,4})?|(:[0-9A-Fa-f]{1,4}){0,2})|(:[0-9A-Fa-f]{1,4}){0,3})|(:[0-9A-Fa-f]{1,4}){0,4})|:(:[0-9A-Fa-f]{1,4}){0,5})((:[0-9A-Fa-f]{1,4}){2}|:(25[0-5]|(2[0-4]|1[0-9]|[1-9])?[0-9])(\.(25[0-5]|(2[0-4]|1[0-9]|[1-9])?[0-9])){3})|(([0-9A-Fa-f]{1,4}:){1,6}|:):[0-9A-Fa-f]{0,4}|([0-9A-Fa-f]{1,4}:){7}:)
IP6OR4 (?:%{IP}|%{IP6})
@Moqume
Moqume / wp-cron.sh
Last active December 29, 2015 05:19 — forked from fcingolani/wp-cron.sh
Run wp-cron for a multi-site installation (accounts for path)
#!/bin/sh
db_host="host";
db_user="user";
db_pass="password";
db_name="database";
domains=`mysql --silent --skip-column-names --host $db_host --user $db_user -p$db_pass $db_name --execute "SELECT CONCAT(domain,path) as url FROM wp_blogs WHERE archived = '0' AND spam = '0' AND deleted = '0';"`;
for domain in $domains; do
the_date=`date`;