Skip to content

Instantly share code, notes, and snippets.

View jtmcdole's full-sized avatar

John McDole jtmcdole

View GitHub Profile
@jtmcdole
jtmcdole / KINESIS-Gaming-Freestyle-Edge-RGB-Split.kbd.json
Last active February 15, 2021 05:39
KINESIS Gaming Freestyle Edge RGB Split
[
{
"backcolor": "#000000",
"name": "KINESIS Gaming Freestyle Edge RGB Split",
"author": "codefu",
"switchMount": "cherry",
"switchBrand": "cherry",
"switchType": "MX1A-G1xx"
},
[
@jtmcdole
jtmcdole / ntz.dart
Last active March 27, 2023 04:52
Number of Trailing Zeros - Dart Edition
/// Returns the number of trailing zeros in a 32bit unsigned integer.
///
/// Hacker's Delight, Reiser's algorithm.
/// "Three ops including a "remainder, plus an indexed load."
///
/// Works because each bit in the 32 bit integer hash uniquely to the
/// prime number 37. The lowest set bit is returned via (x & -x).
ntz32(int x) {
assert(x < 0x100000000, "only 32bit numbers supported");
return _ntzLut32[(x & -x) % 37];
@rodricels
rodricels / .tmux.conf
Last active April 21, 2024 12:22
tmux configuration, mouse copy & paste added
# My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf
# Scroll History
set -g history-limit 50000
# show messages for 4 seconds instead
set -g display-time 4000
# set first window to index 1 (not 0) to map more to the keyboard layout
set-option -g renumber-windows on
From e7129ae561b328301ddbccddd08b98b8097cee3d Mon Sep 17 00:00:00 2001
From: John Thomas McDole <john@mcdole.org>
Date: Thu, 5 Nov 2015 18:37:32 -0800
Subject: [PATCH] Curses Wide Character & UTF8 Support
---
README.cursesw | 14 +++++++++++
include/config.h | 2 +-
include/wincurs.h | 2 --
src/drawing.c | 9 +++++--
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a