This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find all wayland containers in Sway | |
swaymsg -t get_tree | jq -r '.. | .app_id?' | grep -v null | |
# Find all xwayland containers in Sway | |
swaymsg -t get_tree | jq -r '.. | .instance?' | grep -v null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
/* 0: Qwerty layer | |
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ | |
* │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ INS │ DEL │ FN │ | |
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ | |
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ BSPC │HOME │ | |
* ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤ | |
* │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ BSLS │END │ | |
* ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ | |
* │ LCTRL │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │PGUP │ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const trafficLight = Machine({ | |
id: 'trafficLight', | |
initial: 'red', | |
states: { | |
red: { | |
on: { | |
TIMER: 'amber' | |
} | |
}, | |
amber: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const docVideoFlow = Machine({ | |
id: 'docVideo', | |
type: 'parallel', | |
states: { | |
recordState: { | |
initial: 'hideButton', | |
states: { | |
hideButton: { | |
on: { | |
NEXT_RECORD_STATE: 'showButton' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/** | |
* A script to do something handy in an easy way | |
* | |
* For more info, run: | |
* $ <cli-name> --help | |
*/ | |
'use strict' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type SystemTypes = 'os' | 'browser'; | |
export type SystemAttribute = { | |
codeName: string; | |
name: string; | |
versionPrefix: string; | |
}; | |
export type SystemInfo = { | |
name: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
NewerOlder