Skip to content

Instantly share code, notes, and snippets.

Avatar

redbeard brianredbeard

View GitHub Profile
@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

@brianredbeard
brianredbeard / get_token.md
Last active Oct 4, 2021
aws, sts, and bash
View get_token.md

About

AWS provides a mechanism for temporarily assuming another role within their API system. While it is not a technically hard process it can be convoluted and hard to understand. This document aims to both make it easier to follow along with as well as give an in depth explanation of some of the underpinnings of the Bourne Again Shell (aka BASH) which can make this easier to utilize on a day to day basis.

Explanation

Below is an overexplained version of the following process:

  1. Using credentials stored in ~/.aws/credentials as a "profile" which are then understood by the AWS command line tools
  2. Using those AWS credentials, temporarily assume a role using the AWS Security Token Service (STS) to get temporary
@brianredbeard
brianredbeard / arm64.md
Created Sep 26, 2018 — forked from george-hawkins/arm64.md
Running virtualized x86_64 and emulated arm64 Ubuntu cloud images using QEMU
View arm64.md

QEMU arm64 cloud server emulation

This is basically a rehash of an original post on CNXSoft - all credit (particularly for the Virtio device arguments used below) belongs to the author of that piece.

Download the latest uefi1.img image. E.g. ubuntu-16.04-server-cloudimg-arm64-uefi1.img from https://cloud-images.ubuntu.com/releases/16.04/release/

Download the UEFI firmware image QEMU_EFI.fd from https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/

Determine your current username and get your current ssh public key:

@brianredbeard
brianredbeard / cppcheck.out
Last active Aug 5, 2021
Output of running platformio check against the marlin code base with various tools
View cppcheck.out
> Executing task: platformio check --environment STM32F103RE_btt <
Checking STM32F103RE_btt > cppcheck (platform: ststm32@~12.1; board: genericSTM32F103RE; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------
Marlin/src/HAL/shared/backtrace/unwarm.cpp:56: [low:style] The function 'UnwInitState' is never used. [unusedFunction]
Marlin/src/HAL/shared/backtrace/unwarm.cpp:160: [low:style] The function 'UnwMemReadRegister' is never used. [unusedFunction]
Marlin/src/HAL/shared/backtrace/unwarm.cpp:141: [low:style] The function 'UnwMemWriteRegister' is never used. [unusedFunction]
Marlin/src/HAL/shared/backtrace/unwarm.cpp:91: [low:style] The function 'UnwReportRetAddr' is never used. [unusedFunction]
Marlin/src/HAL/shared/backtrace/unwarm_arm.cpp:45: [low:style] The function 'UnwStartArm' is never used. [unusedFunction]
Marlin/src/HAL/shared/backtrace/unwarm_thumb.cpp:32: [low:style] The function 'UnwStartThumb' is
@brianredbeard
brianredbeard / BTConfig.patch
Last active Jul 3, 2021
CNC xPro v5 "patch" set
View BTConfig.patch
--- CNCxPRO src/WebUI/BTConfig.h
+++ Grbl_Esp32 src/WebUI/BTConfig.h
@@ -24,7 +24,7 @@
#endif
//defaults values
-const char* const DEFAULT_BT_NAME = "CNC_xPRO_V5";
+const char* const DEFAULT_BT_NAME = "btgrblesp";
#include <BluetoothSerial.h>
@brianredbeard
brianredbeard / syncrepos.sh
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.
View syncrepos.sh
#!/bin/bash
# This tool can be used to sync down Red Hat based packages from RHN using only Red Hat shipped tools
# Brian "Red Beard" Harrington <brian@dead-city.org>
# 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 https://github.com/rpm-software-management/createrepo_c#differences-in-behavior-between-createrepo_c-and-createrepo
@brianredbeard
brianredbeard / CopyOCPAMI.py
Created Nov 5, 2020
CopyOCPAMI.py - A utility to copy a RHEL CoreOS AMI Image to a different region/account.
View CopyOCPAMI.py
#!/usr/bin/env python
"""CopyOCPAMI.py - A utility to copy OpenShift Amazon Machine Images
Copyright (C) 2020 Brian 'redbeard' Harrington
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
@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 / mpris.py
Created Sep 21, 2020 — forked from FergusInLondon/mpris.py
Retrieve data from a Media Player in Linux, via dbus. (Uses Python)
View mpris.py
import dbus
class MediaPlayer:
"""Recieves state from a MediaPlayer using dbus."""
player_properties = False
def __init__(self, player_name):
# Get an instance of the dbus session bus, and retrieve
# a proxy object for accessing the MediaPlayer
@brianredbeard
brianredbeard / Translate.sh
Created Jul 30, 2020
BASH example of translation using the AWS CLI
View Translate.sh
#!/bin/bash
# Bourne Again Shell example of translation services using the AWS Translate
# service. Requires the AWS CLI tool and JQ to be present in the path.
#
# Directions, edit "langlist.txt" to include the desired languages from the
# following site: https://docs.aws.amazon.com/translate/latest/dg/what-is.html
#
# Next: Edit the "--text" option to include your text to be translated and
# the JQ filter to format the output. In the example below we are translating
# a string for use in translating the description of an application for use in