This file contains hidden or 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
{ | |
"version": 1, | |
"notes": "", | |
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n", | |
"keyboard": "maple_computing/minidox/rev1", | |
"keymap": "minidox-v1", | |
"layout": "LAYOUT_split_3x5_3", | |
"layers": [ | |
[ | |
"KC_Q", |
This file contains hidden or 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 | |
set -xeuo pipefail | |
mkdir -p /tmp/create-word-list | |
declare -r tmp_dir=/tmp/create-word-list | |
declare -r file="$tmp_dir/ordlister.tar.gz" | |
declare -r file_etag="$tmp_dir/ordlister.tar.gz.etag" | |
declare -r remote='https://www.nb.no/sbfil/leksikalske_databaser/ordbank/20190123_norsk_ordbank_nob_2005.tar.gz' | |
curl -sLo "$file" "${zflag[@]}" \ | |
--etag-compare $file_etag \ |
This file contains hidden or 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
# custom properties | |
suppress.focus.stealing=false | |
# ~/.config/i3/config | |
# avoid randomly focusing other windows and closing nav-popups | |
focus_follows_mouse no | |
# presently not required? | |
for_window [class="^jetbrains-.+"][window_type=dialog] focus |
This file contains hidden or 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 | |
if [ "$#" != 1 ]; then | |
printf ' | |
Usage: n7m [word] | |
Will find possible solutions for a numeronym https://en.wikipedia.org/wiki/Numeronym | |
- i18n - internationalization | |
- l10n - localization | |
Example: | |
~ $ n7m i18n | |
\n |
This file contains hidden or 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
import java.math.BigInteger | |
import java.math.BigInteger.ONE | |
import java.math.BigInteger.ZERO | |
fun memoFibonacci(): (Int) -> BigInteger { | |
val memo: MutableMap<Int, BigInteger> = mutableMapOf() | |
fun fibonacci(n: Int): BigInteger = when (n) { | |
1, 2 -> ONE | |
else -> memo.getOrPut(n) { fibonacci(n - 2) + fibonacci(n - 1) } | |
} |
This file contains hidden or 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 bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` or `git checkout` if a specified file was changed | |
# Run `chmod +x post-checkout` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && echo " * changes detected in $1" && echo " * running $2" && eval "$2" |