Skip to content

Instantly share code, notes, and snippets.

@steelbrain
steelbrain / custom_acpi_tables.md
Created February 3, 2024 02:00 — forked from lamperez/custom_acpi_tables.md
Load custom ACPI tables

Github Self Hosted Runner Provisioning

This is the script that I use to provision Github's self hosted runners for my usecase. You may have to make modifications to it to fit your usecase. The script expects to run as root and expects a non-root "administrator" account for the system.

The goal of the provisioning is to bring this setup as close to the real thing as possible. You may have to make some modifications to your github actions config to make the most out of this. Most important of which would be the removal of setup buildx action.

@steelbrain
steelbrain / generate-types.ts
Created June 22, 2023 14:22
Generate static types from a Typescript type for use in sibling projects
import childProcess from 'child_process'
import fs from 'fs'
import path from 'path'
import ts from 'typescript'
import { fileURLToPath } from 'url'
const PATH_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
const PATH_TYPES_SOURCE = path.join(PATH_ROOT, 'src', 'types.ts')
const PATH_TYPES_OUTPUT = path.join(PATH_ROOT, 'src', 'types.output.d.ts')
@steelbrain
steelbrain / bridge-diff-subnet.sh
Created June 11, 2023 02:14 — forked from glenselle/bridge-diff-subnet.sh
Raspberry PI4 Wifi to Eth Bridge
#!/usr/bin/env bash
set -e
[ $EUID -ne 0 ] && echo "run as root" >&2 && exit 1
apt-get update && apt install -y dnsmasq
# Create a directory where we will store our `iptables` forwarding rules.
mkdir -p /etc/iptables
@steelbrain
steelbrain / questions.md
Created August 4, 2022 06:04 — forked from marolsi/questions.md
Relationship Compatibility

Questions to help you consider if a partner is right for you. Be sure to take a step back from your reasons for swaying one way or another, and answer as honestly as possible!

Questions

  1. Do you feel physically attracted to this person?
  2. Do you look forward to spending time with them?
  3. Do you feel like you don’t have to hold back who you are around them?
  4. Do you like the part of yourself that they bring out?
  5. Do you have evidence that your current lifestyles are compatible?
  6. What goals and dreams are important to you in your life? Are they compatible with this person’s goals and dreams?
  7. Do you have any principles that guide your decisions in life? If so, are you confident that they share or at least respect these?
@steelbrain
steelbrain / mariadb_repo_setup
Last active February 25, 2022 22:18
Package installation scripts
#!/usr/bin/env bash
# shellcheck disable=2016 disable=1091 disable=2059
version="2022-02-08"
# Notes:
# 2022-02-08 - Adjust repo pinning for Ubuntu/Debian, update MariaDB to 10.7
# 2022-01-31 - Verify that server version is valid
# 2022-01-18 - Add aarch64 RHEL/SLES repositories
# 2021-12-10 - Update keyring URL
@steelbrain
steelbrain / cygwin-mirror-speed.py
Created October 8, 2020 16:10 — forked from ushkinaz/cygwin-mirror-speed.py
Tests speed of http mirrors of cygwin
#!/usr/bin/env python3
"""
Tests http mirrors of cygwin
"""
import random
import time
from urllib.request import urlopen
import sys
__author__ = 'Dmitry Sidorenko'
@steelbrain
steelbrain / README.md
Last active August 14, 2020 05:07
OLED Brightness Daemon

OLED Brightness Daemon

I'm using this for my Razer Blade 17 Pro 2020 to keep the brightness slider in Ubuntu GNOME up to date with the actual brightness of the display.

It's not pretty but it works. Remember to add this to your startup (gnome-session-properties).

License

Licensed under MIT. Use however.

@steelbrain
steelbrain / One-Dark.itermcolors
Last active April 20, 2020 03:26
One Dark Iterm scheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
@steelbrain
steelbrain / music_metadata.js
Last active December 1, 2018 06:35
Song metadata filling with ffmpeg node script
#!/usr/bin/env node
// Usage:
// $ cd dir/to/music
// $ node ../../music_metadata.js
// Files format must be:
// [Artist] - [Song Title].{oga,m4a}
const fs = require('fs')
const os = require('os')