Skip to content

Instantly share code, notes, and snippets.

View jahkeup's full-sized avatar

Jacob Vallejo jahkeup

View GitHub Profile
@jahkeup
jahkeup / libvirtd-esxi-base.xml
Created December 15, 2020 20:03
libvirtd ESXi 7 domain configuration
<!-- WARNING: this is an example, don't use it :) I guarantee nothing. I claim nothing. -->
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit esxi
or other application using the libvirt API.
-->
<domain type='kvm'>

Framebuffer device on reMarkable 2

See fb.modes(5) and fbset(8) for details on these parameters.

The values here are useful for tools that read out framebuffers off the device to be presented elsewhere (like another computer).

@jahkeup
jahkeup / kbruwatch.sh
Created September 18, 2020 18:41
Get brupop status kubernetes nodes (from annotations)
#!/usr/bin/env nix-shell
#! nix-shell -p kubectl -i bash
outcolumns=(
"NODE:metadata.name"
"EXTERNAL-IP:status.addresses[?(@.type=='ExternalIP')].address"
"ACTION-WANTED:metadata.annotations['bottlerocket\.aws\/action-wanted']"
"ACTION-ACTIVE:metadata.annotations['bottlerocket\.aws\/action-active']"
"STATE:metadata.annotations['bottlerocket\.aws\/action-state']"
"HAS-UPDATE:metadata.annotations['bottlerocket\.aws\/update-available']"
@jahkeup
jahkeup / marlin-collect-config.sh
Created July 4, 2020 04:51
Create a Marlin configuration archive to be shared for debugging
#!/usr/bin/env bash
set -e
# GitHub username to include in the output name.
USERNAME="jahkeup"
# Git treeish referring to the last merge/rebased ref with Marlin.
BASE_REF="refs/remotes/github/bugfix-2.0.x"
git_marker="$(git describe --dirty=.wip --exclude='*' --always --abbrev=8 --all)"
archive_name="$USERNAME-config-$(date -u +'%s')-$git_marker"
@jahkeup
jahkeup / platformio-monitor-dev.sh
Created June 21, 2020 18:50
Helper script to watch a device and connect when it becomes available.
#!/usr/bin/env bash
if ! hash platformio logger; then
echo "ERROR: missing required commands" >&2
exit 1
fi
log() {
local level="${1:?log level required}"
shift 1
@jahkeup
jahkeup / 00-README.md
Last active April 30, 2020 18:32
Bottlerocket development with direnv

direnv workspace environment helper

Using direnv, one can load the Bottlerocket environment to build single packages and iterate as needed.

Using this

# Assuming you have direnv installed:
curl -sSL https://gist.githubusercontent.com/jahkeup/1dd24208ec35596da7d78ffddcd0738a/raw/10-bottlerocket-os-direnv-dotenv.sh >> .envrc
direnv allow
#!/usr/bin/env bash
FILES=$HOME/.ssh/config.d/*
if [ -z "$FILES" ]; then
echo "No files to reconfigure"
exit 1
fi
echo "# Generated by ssh-reconfigure $(date)" > $HOME/.ssh/config
for f in ${FILES[*]}; do
echo "# BEGIN $(basename $f)" >> $HOME/.ssh/config
@jahkeup
jahkeup / Dockerfile
Last active September 12, 2018 14:34
standard_init_linux.go:190: exec user process caused "no such file or directory" - ECS AMI Test
FROM busybox:latest
RUN echo "#!/no/interpreter" >> /nointerp.sh && \
chmod +x /nointerp.sh && \
echo "#!/bin/env ruby" >> /missing-from-path.sh && \
cp /missing-from-path.sh /nochmod.sh && \
chmod +x /missing-from-path.sh
@jahkeup
jahkeup / configuration.nix
Created April 21, 2018 22:17
NixOS qcow2 build
{ hostName, pkgs, ... }:
{
imports = [
./hardware.nix
];
networking.hostName = hostName;
time.timeZone = "America/Los_Angeles";
system.copySystemConfiguration = true;

Keybase proof

I hereby claim:

  • I am jahkeup on github.
  • I am jake (https://keybase.io/jake) on keybase.
  • I have a public key whose fingerprint is ECD9 3D04 EFA3 4C14 5FA5 E8F1 DE27 4C9C 098D 9508

To claim this, I am signing this object: