Skip to content

Instantly share code, notes, and snippets.

@kevinraymond
kevinraymond / gitpod+rke2.md
Last active September 5, 2022 02:52
Gitpod+RKE2 Deployment Notes

Gitpod Self-hosted + RKE2

My journey so far making Gitpod play nice with RKE2, and other notes. This is what I've got working in the very small amount of time I have to work on this. Hopefully this helps as a starting point for a more robust and supported Gitpod+RKE2 solution.

This only documents some of the specific configurations, not everything needed to create the cluster itself (e.g., VPC; DNS).

I will update as time permits along the way!

Reference: gitpod-io/gitpod#5410

@yorickdowne
yorickdowne / README.md
Last active June 26, 2024 10:31
Ubuntu Desktop 20.04 with mirrored ZFS boot drive

Ubuntu 24.04

From the comments: "These exact instructions are not working on Ubuntu 24.04. Ubuntu has changed the naming of ZFS partitions, partition 2 and 3 are switched around, and the boot/efi folder is now different."

I don't have my dual-disk test system any longer, and so can't adjust these steps myself.

Overview

Ubuntu Desktop 20.04 supports a single ZFS boot drive out of the box. I wanted a ZFS mirror, without going through an entirely manual setup of Ubuntu as described by OpenZFS in their instructions for Ubuntu 20.04 and instructions for Ubuntu 22.04

@yvesh
yvesh / proxmox-zfs-encryption.md
Last active June 29, 2024 18:53
Proxmox 6.1 ZFS native full disk (ZFS root) encryption.

Simple guide for fulldisk encryption with Proxmox and ZFS native encryption

Install normally using the installer, after the setup reboot into recovery mode (from the USB stick). Make sure to install in UEFI mode (you need systemd-boot).

If the USB stick is not working for you, because of the old Kernel version (2.6.x), you can also use an Ubuntu 19.10 / 20.04 boot stick. ZFS suport is enabled there out of the box.

Steps:

@silver-xu
silver-xu / ts-boilerplate.md
Last active June 19, 2024 15:10
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting
@zoilomora
zoilomora / README.md
Last active June 28, 2024 04:59
How to disable cloud-init in Ubuntu

How to disable cloud-init in Ubuntu

Prevent start

  • Create an empty file to prevent the service from starting

      sudo touch /etc/cloud/cloud-init.disabled
    

Uninstall

@joeytwiddle
joeytwiddle / async-await-forEach-alternatives.md
Last active July 22, 2024 09:05
Do not use forEach with async-await

Do not use forEach with async-await

TLDR: Use for...of instead of forEach() in asynchronous code.

For legacy browsers, use for...i or [].reduce()

To execute the promises in parallel, use Promise.all([].map(...))

The problem

@smoser
smoser / README.md
Last active May 11, 2024 12:39
Boot a specific installed Ubuntu kernel using grub-reboot and grub-set-default

Ubuntu Grub Boot Kernel

Boot a specific installed Ubuntu kernel using grub-reboot and grub-set-default.

This allows you to pick what kernel you want to boot on next reboot, or set the default, without having to know much about how grub works or editing config files.

Usage

  Usage: boot-kernel [options] [kernel]

call grub-reboot or grub-set-default to boot the provided kernel.

@systemfreund
systemfreund / stream-twitter.sh
Last active November 9, 2021 17:14
Twitter stream integration for mattermost
#!/bin/bash
# dependencies:
# curl
# culicue - curl wrapper to make oauthv1 requests (https://github.com/decklin/curlicue/blob/master/curlicue)
# jq - filter json from twitter api and transform to a structure mattermost is expecting
# credentials file can be created with the curlicue-setup script
credentials=/home/me/credentials.conf
webhook='https://yourmattermost.server/hooks/1mjxx6amd52q8doxzy16o75adh'
@theothertomelliott
theothertomelliott / AsyncTestingPrimer.m
Created September 8, 2015 16:25
A primer for testing asynchronous calls with XCTest in Objective-C
#import <XCTest/XCTest.h>
@interface AsyncTestingPrimer : XCTestCase
@end
@implementation AsyncTestingPrimer
/*
* This is how not to test async calls
@sivel
sivel / better-ssh-authorized-keys-management.md
Last active July 12, 2024 04:25
Better SSH Authorized Keys Management

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server: