Skip to content

Instantly share code, notes, and snippets.

@joeyv120
joeyv120 / qmk_c_json.txt
Created November 30, 2021 20:14
QMK commands for converting between json and c keymap files
qmk json2c2 C:/Users/[USERSAME]/qmk_firmware/keyboards/JNAO/keymaps/JoeNAO/keymap.json
qmk c2json -km joeyv120 -kb keebio/iris/rev4 C:/Users/[USERSAME]/qmk_firmware/keyboards/keebio/iris/keymaps/joeyv120/keymap.c
qmk c2json -km JoeNAO -kb jnao C:/Users/[USERSAME]/qmk_firmware/keyboards/JNAO/keymaps/JoeNAO/keymap.c --no-cpp
@joeyv120
joeyv120 / ni_reserve.py
Created September 9, 2021 18:41
NI-DAQmx device reservation heist
"""Steal a network device for exclusive use regardless of reservation"""
import warnings
import nidaqmx as ni
# ignore warnings from nidaqmx (i.e. network device is already in the system)
warnings.filterwarnings('ignore', module='nidaqmx')
host = 'cDAQ9185-1E00AD8' # ip address or host name
cdaq = ni.system.device.Device(name=host)
@joeyv120
joeyv120 / TicToc.py
Created April 1, 2021 14:17
Tic Toc Timer
from time import time
class TicToc():
'''
Represents a simple timer-like, or stopwatch object.
tic() starts the timer.
toc() returns time (seconds) since tic() was called.
'''
def __init__(self):