Skip to content

Instantly share code, notes, and snippets.

View nmbrgts's full-sized avatar

Tyler N. nmbrgts

View GitHub Profile
@nmbrgts
nmbrgts / karabiner.json
Created March 24, 2023 18:55
This is my Karabiner config, which provides a rough home-row-mod-like experience. The rules that follow the "<key>/<mod>" naming convention might help others write similar or better rules. "to_if_alone" doesn't perfectly replicate mod-tap behavior though. If you hold down a key and release it, the key will still register as it's "to_if_alone" va…
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
@nmbrgts
nmbrgts / kwic.py
Last active May 6, 2020 10:00
KWIC Refactoring Drill
#######################################################################
## INPUT MODULE
import copy
# List of list of words
line_storage = None
def _line_check():
assert line_storage is not None, "Must call putfile before calling access methods"
@nmbrgts
nmbrgts / todo_list.py
Last active April 8, 2020 07:00
To-Do List: Design Exercise
from typing import Iterable, Callable, Any
from enum import Enum, auto
from datetime import date
Comparable = Any
# Placeholder type hint. A "Comparable" would be an object that
# implements at least __lt__.
class OrderedEnum(Enum):
public enum DisplayMode {
SMALL,
MEDUIM,
}
public void displayGame(DisplayMode mode) {
if (mode.equals(DisplayMode.SMALL)) {
setColorDepth(8);
drawRect(screen, 1024, 768);
} else if (mode.equals(DisplayMode.MEDUIM)) {