Skip to content

Instantly share code, notes, and snippets.

View brandonkal's full-sized avatar

Brandon Kalinowski brandonkal

View GitHub Profile
#!/usr/bin/env bash
dir="/tmp/zellij/bootstrap"
case $(uname -m) in
"x86_64"|"aarch64")
arch=$(uname -m)
;;
"arm64")
arch="aarch64"
@brandonkal
brandonkal / log.txt
Last active June 29, 2024 06:27
Ubuntu Incus Distrobuilder
root@45d:~/incus-build# distrobuilder pack-incus ubuntu.yaml rootfs -o source.url=http://archive.ubuntu.com/ubuntu -o image.serial=20240628 -o image.release=jammy -o image.variant=complete --vm
INFO [2024-06-29T05:45:38Z] Managing repositories
INFO [2024-06-29T05:45:38Z] Running hooks trigger=post-unpack
INFO [2024-06-29T05:45:38Z] Managing packages
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
@brandonkal
brandonkal / st-joseph-novena.md
Last active November 2, 2022 21:53
St. Joseph Novena

title:: St. Joseph Novena

This precious treasury of prayers in honor of St. Joseph is to be prayed for 30 days, commemorating the earthly thirty years which St. Joseph spent in the company of our Lord.

It takes approximately 20-25 minutes and "the extraordinary graces obtained by this prayer are innumerable".

It is said that any missed days may be caught up on the 30th day. So if one were to miss 2 days (not recommended), then the prayers in their totality would be recited 3 times on the final day.

PRAYER FOR ST. JOSEPH’S HOLY CLOAK NOVENA

@brandonkal
brandonkal / Sophia.ps1
Created January 4, 2022 09:48
Windows Setup Scripts
<#
.SYNOPSIS
Default preset file for "Sophia Script for Windows 10"
Version: v5.12.10
Date: 31.12.2021
Copyright (c) 2014—2022 farag
Copyright (c) 2019—2022 farag & Inestic
@brandonkal
brandonkal / openpgp.md
Last active May 9, 2024 16:18
PGP Proof
@brandonkal
brandonkal / .editorconfig
Last active February 15, 2020 20:11
Sudoku Solver
[*]
indent_style = tab
indent_size = 4
@brandonkal
brandonkal / deno-bridge.ts
Created January 15, 2020 07:46
An attempt to use Deno types in Node
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-empty-interface */
/// <reference path="../node_modules/@types/node/index.d.ts" />
import * as os from "os"
function noop() {}
@brandonkal
brandonkal / go.ts
Created November 29, 2019 06:26
Go -- simplified async error handling in Typescript
export type PromiseType<T extends Promise<any>> = T extends Promise<infer U>
? U
: never
export type Arguments<T> = T extends (...args: infer U) => infer R ? U : never
export type ReplaceReturn<T, TNewReturn> = (...a: Arguments<T>) => TNewReturn
type Fn = (...args: any[]) => any
export type Go<E extends Error, T extends Fn> = {
@brandonkal
brandonkal / useInitialMeasure.tsx
Created August 19, 2019 11:04
useMeasure Hooks
import React from 'react'
export interface Size {
width: number
height: number
}
export function useInitialMeasure(ref: React.RefObject<HTMLElement | null>) {
const [bounds, setBounds] = React.useState<Size>({
width: 0,
@brandonkal
brandonkal / ts-string.ts
Last active June 18, 2019 18:59
Typescript Return type from compiled string
import ts from 'typescript'
import fs from 'fs'
import path from 'path'
function transform(
contents: string,
libSource: string,
compilerOptions: ts.CompilerOptions = {}
) {
if (!compilerOptions.target) {