Skip to content

Instantly share code, notes, and snippets.

@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')

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 / custom_acpi_tables.md
Created February 3, 2024 02:00 — forked from lamperez/custom_acpi_tables.md
Load custom ACPI tables