Skip to content

Instantly share code, notes, and snippets.

#include QMK_KEYBOARD_H
enum layer_names {
_QWERTY,
_LOWER,
_RAISE,
_FUNCTION,
_ADJUST,
};
@damouse
damouse / bump
Last active July 22, 2020 21:58
Script to automatically bump semver version.
#!/bin/bash
# Bumps the semantic version of the git-project.
# If no semantic version tags exist in the project, the version starts out at v0.0.0
# and is incremented by one for the field indicated by the bump command argument.
# Example Usage:
# Show the current tag
# bump -l
@damouse
damouse / Updated Atomic OLKB mapping
Last active August 23, 2020 17:12
OLKB Atomic mappings. Flash with qmk flash atomic.json -bl dfu
{"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":"atomic","keymap":"atomic","layout":"LAYOUT_ortho_5x15","layers":[["KC_ESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_NO","KC_NO","KC_NO","KC_NO","KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_EQL","KC_RBRC","KC_BSLS","KC_END","KC_GRV","KC_A","KC_S","KC_D","KC_F","KC_G","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_QUOT","KC_ENT","KC_VOLU","KC_PGUP","KC_LSFT","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_RSFT","KC_VOLD","KC_UP","KC_PGDN","KC_LCTL","KC_LALT","KC_LGUI","LCTL(
@damouse
damouse / nyquist 4x12 layout, qmk configurator
Last active July 29, 2021 01:44
Flash with `qmk flash sphinx.json -bl dfu-split-left`
{"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":"keebio/nyquist/rev3","keymap":"keebio_nyquist_rev3_layout_ortho_5x12_mine","layout":"LAYOUT_ortho_5x12","layers":[["KC_ESC","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_EQL","KC_U","KC_I","KC_O","KC_P","KC_Y","KC_TAB","KC_A","KC_S","KC_D","KC_F","KC_G","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_QUOT","KC_LSFT","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_N","KC_M","KC_COMM","KC_DOT","KC_UP","KC_ENT","KC_LCTL","KC_LALT","KC_LGUI","KC_NO","KC_DEL","MO(1)","KC_SPC","KC_BSPC","MO(2)","KC_LEFT","KC_DOWN","KC_RGHT","KC_LCTL","KC_LALT","KC_LGUI","KC_NO","KC_DEL","MO(1)","KC_SPC","KC_BSPC","
╔═════════════════╦════════════════════════════════════════╗
║ Syntax ║ Result ║
╠═════════════════╬════════════════════════════════════════╣
║ arr=() ║ Create empty array ║
║ arr=(1 2 3) ║ Initialize array ║
║ ${arr[2]} ║ Retrieve third element ║
║ ${arr[@]} ║ Retrieve all elements ║
║ ${!arr[@]} ║ Retrieve array indices ║
║ ${#arr[@]} ║ Calculate array size ║
║ arr[0]=3 ║ Overwrite 1st element ║
@damouse
damouse / nuclear_data.json
Last active December 22, 2023 01:47
qmk nuclear data
{
"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 ompile and flash with: qmk json2c keyboards/kprepublic/jj50v2/keymaps/damouse/damouse.json > ./keyboards/kprepublic/jj50v2/keymaps/damouse/keymap.c && make kprepublic/jj50v2:damouse:flash",
"keyboard": "kprepublic/jj50",
"keymap": "kprepublic_jj50_layout_ortho_5x12_mine",
"layout": "LAYOUT_ortho_5x12",
"layers": [
[
"KC_ESC",
@damouse
damouse / nginx.conf
Last active January 9, 2024 18:26
Nginx wss reverse proxy on the back of letsencrypt
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;