Skip to content

Instantly share code, notes, and snippets.

View brianredbeard's full-sized avatar

redbeard brianredbeard

View GitHub Profile
@brianredbeard
brianredbeard / tmux.conf
Created February 12, 2014 20:10
A better starting tmux config. Live like screen, but better
# 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
brianredbeard / README.md
Last active August 14, 2024 22:33
lspot.py

list spot

a simple utility to quickly identify the cheapest spot location for an instance type

examples

❯ AWS_PROFILE=redbeard python3.11 lspot.py --help
usage: lspot.py [-h] [--json] [--table] [-v] [-1] [-r REGION] instance_type
@brianredbeard
brianredbeard / instructlab.txt
Created May 7, 2024 17:57
Demo of using Instructlab to explain vector in RISC-V
>>> Explain how the vector extension for RISC-V works. Provide definitions of key concepts and components, how it works, and it's benefits. [S][default]
╭─────────────────────────────────────────────────────────────────────────────────────────────── merlinite-7b-lab-Q4_K_M ────────────────────────────────────────────────────────────────────────────────────────────────╮
│ The vector extension for RISC-V is an enhancement to the RISC-V Instruction Set Architecture (ISA) that allows multiple operations to be performed on multiple data elements in parallel, thereby increasing the │
│ throughput of calculations and improving performance in data-intensive applications. This extension introduces new vector registers, vector instructions, and data alignment concepts to optimize the processing of │
│ vector data.
@brianredbeard
brianredbeard / 00_popcorn_tofu.md
Last active April 23, 2024 23:57
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

@brianredbeard
brianredbeard / disassembly_walkthrough.md
Last active March 8, 2024 00:47
NOOOOOOO disassemble
@brianredbeard
brianredbeard / syncrepos.sh
Last active January 30, 2024 06:23
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.
#!/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
❯ picocom -b 115200 /dev/ttyUSB0
picocom v3.1
port is : /dev/ttyUSB0
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
stopbits are : 1
escape is : C-a
@brianredbeard
brianredbeard / README.md
Last active July 19, 2023 19:25
fedora public bridge configs

Container / VM Bridging

About

Traditionally virtual machines and containers are exposed on a bridge which is solely available behind a single IP address exposed behind network/port address translation (NAT/PAT). This is, in general an acceptable practice but leads to some configuration challenges when testing out technologies like network booting of hosts, firewalling, equal cost multipath, etc.

This configuration will allow a user to move the IP address of the host to an internal bridge

@brianredbeard
brianredbeard / shell.out
Created May 8, 2023 00:40
ESP-IDF MicroPython Component errors
### Current Directory Structure (micropython submodule pruned)
❯ tree --gitignore
.
├── CMakeLists.txt
├── components
│   └── micropython
├── main
│   ├── CMakeLists.txt
│   ├── idf_component.yml
│   └── mp-test.c
@brianredbeard
brianredbeard / get_token.md
Last active October 3, 2022 02:18
aws, sts, and bash

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