Skip to content

Instantly share code, notes, and snippets.


redbeard brianredbeard

View GitHub Profile
brianredbeard / sshpub-to-rsa
Created Jan 26, 2012 — forked from thwarted/sshpub-to-rsa
converts an openssh RSA public key into a format usable by openssl rsautl (if you don't have openssh 5.6 or later with ssh-keygen PEM export format)
View sshpub-to-rsa
#!/usr/bin/env python
# with help and inspiration from
# * ASN1_generate_nconf(3) (specifically the SubjectPublicKeyInfo structure)
# *
# *
import sys
import base64
import struct
brianredbeard /
Last active Dec 23, 2015 — forked from slojo404/logstash RPM spec
Updated to more closely follow Linux Standard Build (lsb; practices as well as more clearly abstract the function of the agent to support separate scripts for shippers, indexers, etc.
# logstash Startup script for logstash
# chkconfig: 2345 20 80
# description: Logstash is a log shipping, indexing, and collocation tool.
# processname: java
# Provides: logstash
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
brianredbeard /
Last active Jun 8, 2021
Reposync - A better tool than mrepo. Use this to sync down all channels a RHEL system is subscribed to and turn them into locally exposed yum repositories.
# This tool can be used to sync down Red Hat based packages from RHN using only Red Hat shipped tools
# Brian "Red Beard" Harrington <>
# Copyright 2013
# To satisfy the pre-reqs for this script install the following two rpms:
# yum-utils
# createrepo_c (in RHEL 8 createrepo and createrepo_c have been combined)
# See
brianredbeard / init.pp
Created Nov 14, 2013
augeas sample inside of puppet for performing basic configurations
View init.pp
class ipa {
package { [ 'ipa-server', 'bind', 'bind-dyndb-ldap' ]:
ensure => 'installed',
augeas { 'nis domain name':
context => "/files/etc/sysconfig/network",
changes => [
brianredbeard / hubot
Created Nov 14, 2013
Startup script for a Red Hat SCL based node.js application which should run on startup - Hubot. (Note, this isn't a _good_ example, simply _an_ example).
View hubot
# hubot
# chkconfig: 345 20 80
# description: hubot
# processname: hubot
# This script assumes you have a user called "hubot" on your system and that hubot is installed in /opt/hubot
# Fore more info on this craziness -
brianredbeard /
Last active Aug 26, 2019
MariaDB / MySQL Backup script
# Simple script to dump the contents of a database into separate files in the directory "/backups/"
# Symlink into /etc/cron.daily/ or add to crontab
# Originally from:
# /usr/local/scripts/db_dump
#mysqldump -x --add-drop-table --all-databases > /backups/mysqldb-`date +%F-%I%p`.sql
/usr/bin/mysql --defaults-extra-file=/root/.my.cnf -e 'show databases' | /bin/awk '{print $1}' | /bin/grep -v "^Database$" | /usr/bin/xargs -i{} /usr/bin/mysqldump --defaults-extra-file=/root/.my.cnf --opt -Q -r /backups/{}-`date +%F-%I%p`.sql {}
brianredbeard / tmux.conf
Created Feb 12, 2014
A better starting tmux config. Live like screen, but better
View tmux.conf
# make CTRL+a the 'prefix' ala screen.
bind C-a send-prefix
set -g prefix C-a
# get rid of the tmux standard of CTRL+b
unbind C-b
set -s escape-time 1
set -g base-index 1
setw -g pane-base-index 1
# make it easy to reload the config (CTRL+r)
brianredbeard /
Last active Aug 29, 2015
Glance load - a utility to monitor an ETag and load the corresponding file into glance.
#!/usr/bin/env bash
# Brian "Redbeard" Harrington <>
# This code is in the public domain.
# A tool for monitoring remote files and loading them into a glance image
# store. This tool has been optimized for use on CoreOS but should work
# for most files where an ETag is exposed.
brianredbeard / .config
Created Sep 19, 2014
"corebox" buildroot config
View .config
# Automatically generated file; DO NOT EDIT.
# Buildroot 2014.08 Configuration
# Target options

Keybase proof

I hereby claim:

  • I am brianredbeard on github.
  • I am brianredbeard ( on keybase.
  • I have a public key whose fingerprint is 9244 6DEB CE08 9086 7E4C C634 933F 5408 3D6D F566

To claim this, I am signing this object: