Skip to content

Instantly share code, notes, and snippets.

Avatar

redbeard brianredbeard

View GitHub Profile
@brianredbeard
brianredbeard / .config
Last active Oct 15, 2020
buildroot config for node.js
View .config
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 Dec 29, 2014
List information on Digital Ocean images
View list_images.sh
#!/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
View 05-bond0.network
[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
logstash config to break out systemd output from `/usr/lib/systemd/systemd-journal-upload`
View logstash.conf
input {
tcp {
port => 19532
type => journald
}
}
filter {
if [type] == "journald" {
multiline {
@brianredbeard
brianredbeard / halfass.sh
Created Feb 3, 2015
half assed password tool. this gives you 20 randomized alpha number passwords with NATO phonetics and no confusing characters
View halfass.sh
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'"
View gin_and_tonic.md
@brianredbeard
brianredbeard / gist:dea1337f34cfdd76326f
Last active Aug 29, 2015
sample cloud-config for DO
View gist:dea1337f34cfdd76326f
#cloud-config
coreos:
units:
- name: etcd.service
command: restart
- name: fleet.service
command: restart
etcd:
@brianredbeard
brianredbeard / generate_etcd_dropins.sh
Last active Dec 16, 2015
Generation of etcd dropins based on a list of ip addresses
View generate_etcd_dropins.sh
#!/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
View gentoo-stage3-aci.sh
#!/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 Oct 19, 2021
Wheatsville Popcorn Tofu and Cashew Tamari Dressing
View 00_popcorn_tofu.md

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