Skip to content

Instantly share code, notes, and snippets.

View brianredbeard's full-sized avatar

redbeard brianredbeard

View GitHub Profile
@brianredbeard
brianredbeard / .config
Last active October 15, 2020 00:41
buildroot config for node.js
BR2_HAVE_DOT_CONFIG=y
BR2_ARCH_IS_64=y
BR2_x86_64=y
BR2_ARCH="x86_64"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_ARCH="nocona"
BR2_ARCH_HAS_ATOMICS=y
BR2_X86_CPU_HAS_MMX=y
BR2_X86_CPU_HAS_SSE=y
BR2_X86_CPU_HAS_SSE2=y
@brianredbeard
brianredbeard / list_images.sh
Created December 29, 2014 20:00
List information on Digital Ocean images
#!/bin/bash
source .do
output=$(curl -s -X GET "https://api.digitalocean.com/v2/droplets" -H "Authorization: Bearer $TOKEN")
if [ "$1" == "-a" ]; then
echo $output | jq -s '.[][][] | { name: .name?, id: .id?, ip_address: .networks.v4[].ip_address} | select(.name | contains("redbeard"))' | grep -v -f reserved
else
echo $output | jq -s '.[][][] | { name: .name?, id: .id?} | select(.name | contains("redbeard")) | .id' | grep -v -f reserved
fi
@brianredbeard
brianredbeard / 05-bond0.network
Last active August 29, 2015 14:14
network samples
[Match]
Name=bond0
[Network]
Address=192.168.1.111/24
Gateway=192.168.1.1
DNS=8.8.8.8
@brianredbeard
brianredbeard / logstash.conf
Last active May 2, 2016 20:28
logstash config to break out systemd output from `/usr/lib/systemd/systemd-journal-upload`
input {
tcp {
port => 19532
type => journald
}
}
filter {
if [type] == "journald" {
multiline {
@brianredbeard
brianredbeard / halfass.sh
Created February 3, 2015 01:46
half assed password tool. this gives you 20 randomized alpha number passwords with NATO phonetics and no confusing characters
alias passthing="curl -s -L 'https://secure.pctools.com/guides/password/?length=13&phonetic=on&alpha=on&mixedcase=on&numeric=on&nosimilar=on&quantity=20&generate=true#password_generator' | grep \"<tr><td valign=top nowrap style='border: 1px solid #c5c5c7;padding-top:3px;padding-bottom:3px'><b>\" | sed -r 's/<tr><td valign=top nowrap style=.border: 1px solid #c5c5c7;padding-top:3px;padding-bottom:3px.><b>([[:alnum:]]+)<.b><.td><td valign=top style=.border: 1px solid #c5c5c7;padding-top:3px;padding-bottom:3px.><i>([-a-zA-Z \(\)]+)<.i><.td><.tr>/\1 \2/g'"
@brianredbeard
brianredbeard / gin_and_tonic.md
Last active December 10, 2021 16:54
Tonic Recipe
@brianredbeard
brianredbeard / gist:dea1337f34cfdd76326f
Last active August 29, 2015 14:20
sample cloud-config for DO
#cloud-config
coreos:
units:
- name: etcd.service
command: restart
- name: fleet.service
command: restart
etcd:
@brianredbeard
brianredbeard / generate_etcd_dropins.sh
Last active December 16, 2015 23:59
Generation of etcd dropins based on a list of ip addresses
#!/bin/bash
#
# usage: ./generate_etcd.sh 10.240.0.14 10.240.0.12 10.240.0.13
# output is in /tmp
for ipaddr in "$@"
do
let count+=1
peerlist="${peerlist},infra${count}=http://${ipaddr}:2380"
done
#!/usr/bin/env bash
set -e
# Set default values
: ${GENTOO_ARCH:=amd64}
: ${GENTOO_PROFILE:=""}
: ${GENTOO_PORTAGE:=no}
# Check for Gentoo profile, if there if a profile, add a "-"
if [ "${GENTOO_PROFILE}x" != "x" ]; then
@brianredbeard
brianredbeard / 00_popcorn_tofu.md
Last active November 9, 2022 00:22
Wheatsville Popcorn Tofu and Cashew Tamari Dressing

Popcorn Tofu

As reverse engineered from Wheatsville Co-op, Austin, TX

About

After a bit of hunting far and wide I have achieved success. For anyone who's been to Wheatsville Co-op in Austin, Texas knows that it's the bomb. It's received enough of a following that it has it's own Facebook page. The problem is that it's a closely guarded secret with only sparse smatterings of it to be found. At one point I found a recipe in a book