Skip to content

Instantly share code, notes, and snippets.

mmb / blackbox.yml
Created Dec 5, 2021
Pi-hole blackbox probe to test DNS blocking
View blackbox.yml
prober: dns
timeout: 5s
query_type: A
- ".*"
mmb / cloudformation_a_record_from_eip.json
Created Sep 29, 2015
creating a route 53 A record pointing to an elastic ip
View cloudformation_a_record_from_eip.json
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"aRecord": {
"Properties": {
"HostedZoneId": {
"Ref": "hostedZone"
"Name": "",
"ResourceRecords": [
mmb / k8s_yaml_stream_parse.go
Created Jun 25, 2021
Parse a stream of kubernetes YAML on stdin into objects for reading
View k8s_yaml_stream_parse.go
package main
import (
appsv1 ""
corev1 ""
mmb / gist:a260ccc14b739b73c181
Created Mar 28, 2015
WeeChat python script to print python version and path
View gist:a260ccc14b739b73c181
import sys
import weechat
if weechat.register('test', 'test', 'test', 'test', 'test', 'shutdown', ''):
weechat.prnt('', str(sys.version))
weechat.prnt('', str(sys.path))
mmb /
Created May 11, 2010
script to change Skype status
# script to change Skype status, usage: new_status
# Copyright (c) 2010
# Matthew M. Boedicker <>
# 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
mmb / gist:6a13776534edc055b4371769fa5dd0d9
Created May 19, 2020
let me know when the internet connection is fixed
View gist:6a13776534edc055b4371769fa5dd0d9
ping -o && say 'internet is back'
mmb / Makefile
Created Sep 27, 2018
Makefile for graphviz
View Makefile
SRCS = $(wildcard *.dot)
PDFS = $(patsubst,%.pdf,$(SRCS))
PNGS = $(patsubst,%.png,$(SRCS))
all: pdfs pngs
pdfs: $(PDFS)
pngs: $(PNGS)
mmb / gist:3704738
Created Sep 12, 2012
Scripting VM virtual consoles from the host.
View gist:3704738
# Writing to Linux virtual consoles to simulate user input:
s = "ls\n"
open('/dev/tty1','w') do |f|
s.each_char do { |c| f.ioctl(0x5412, c) }
# From the shell:
echo 7 | ruby -e "open('/dev/tty1', 'w') { |o| \$stdin.each_char { |c| o.ioctl(0x5412, c) } }"
mmb / unencrypted_objects.rb
Created Nov 2, 2017
List objects in an S3 bucket with no server-side encryption
View unencrypted_objects.rb
require 'aws-sdk-s3'
client = 'us-west-2')
bucket = 'bucket1'
resp = client.list_objects(bucket: bucket)
resp.contents.each do |object|
metadata = client.head_object(bucket: bucket, key: object.key)
puts object.key unless metadata.server_side_encryption
mmb /
Last active Aug 4, 2017
graphite/statsd/grafana setup on new Amazon Linux instance
# graphite/statsd/grafana setup on new Amazon Linux instance
# add http://graphite/ to grafana as a data source
sudo su
yum update --assumeyes
yum install --assumeyes docker
service docker start
docker \
run \