Skip to content

Instantly share code, notes, and snippets.

View ethan605's full-sized avatar

Thanh Nguyen ethan605

View GitHub Profile
@ethan605
ethan605 / !KBD75_REV1_MINIMAL52.md
Last active October 10, 2025 08:31
QMK config for kdb75 rev1 - minimal 52 keys
  1. Follow QMK setup guide to clone qmk_firmware

  2. Configure qmk-cli:

    $ qmk config user.keyboard=kbdfans/kbd75/rev1
    $ qmk config user.keymap=minimal52
    $ qmk config user.qmk_home=/path/to/qmk
  3. Clone this gist to /path/to/qmk/keyboards/kbdfans/kbd75/keymaps/minimal52/

@ethan605
ethan605 / machine.js
Created April 14, 2021 15:58
Generated by XState Viz: https://xstate.js.org/viz
const trafficLight = Machine({
id: 'trafficLight',
initial: 'red',
states: {
red: {
on: {
TIMER: 'amber'
}
},
amber: {
@ethan605
ethan605 / machine.js
Last active April 14, 2021 15:57
Generated by XState Viz: https://xstate.js.org/viz
const docVideoFlow = Machine({
id: 'docVideo',
type: 'parallel',
states: {
recordState: {
initial: 'hideButton',
states: {
hideButton: {
on: {
NEXT_RECORD_STATE: 'showButton'
@ethan605
ethan605 / !google_chrome_fake_media_stream
Last active December 11, 2021 14:16
Google Chrome with fake media stream
We couldn’t find that file to show.
@ethan605
ethan605 / !nuc_arch_qemu_gpu_passthrough
Last active June 17, 2021 16:02
Intel NUC10i7FNH/K + Arch Linux: QEMU/KVM Windows 10 guest with CPU pinning + GPU passthrough with Intel GVT-g + Hugepages
We couldn’t find that file to show.
export type SystemTypes = 'os' | 'browser';
export type SystemAttribute = {
codeName: string;
name: string;
versionPrefix: string;
};
export type SystemInfo = {
name: string;
@ethan605
ethan605 / print256colours.sh
Created September 11, 2020 14:43 — forked from HaleTom/print256colours.sh
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@ethan605
ethan605 / qrgpg.sh
Last active May 12, 2025 12:45
qrgpg - encode/decode ASCII armoured file to/from QRCode images
#!/usr/bin/env bash
set -Eeuo pipefail
readonly RED=$(tput setaf 1)
readonly GREEN=$(tput setaf 2)
readonly YELLOW=$(tput setaf 3)
readonly NORMAL=$(tput sgr0)
readonly COMMAND="qrgpg"
SUB_COMMAND=""
@ethan605
ethan605 / !nerdfont-icons
Last active March 30, 2023 12:33
List all icons supported by a nerd font
We couldn’t find that file to show.