Skip to content

Instantly share code, notes, and snippets.

View slice's full-sized avatar
🎯
Focusing

Skip R. slice

🎯
Focusing
View GitHub Profile
@slice
slice / keymap.c
Last active October 29, 2024 07:12
adds a custom qmk keycode to send apple's globe key (tested with qmk/qmk_firmware@c134822486, 2024-08-26)
// …
// https://github.com/qmk/qmk_firmware/blob/master/docs/custom_quantum_functions.md#defining-a-new-keycode
enum my_keycodes {
// apple globe key
AP_GLOB = SAFE_RANGE,
};
// https://gist.github.com/fauxpark/010dcf5d6377c3a71ac98ce37414c6c4?permalink_comment_id=4722673#gistcomment-4722673
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@slice
slice / repair_nixbld_users.fish
Last active June 22, 2024 20:43
repair nixbld users on macOS and rebase their uids
#!/usr/bin/env fish
# don't blindly run this :-)
set -l uid_base 1000
function local_dscl
dscl . $argv; or exit 1
end
diff --git a/libraries/terminfo/Changelog b/libraries/terminfo/Changelog
index ed84923..c1ebbdb 100644
--- a/libraries/terminfo/Changelog
+++ b/libraries/terminfo/Changelog
@@ -1,3 +1,6 @@
+Changed in version 0.4.1.5:
+- Use CAPI for `tparm` to fix behavior on Apple Silicon (#41).
+
Changed in version 0.4.1.4:
@slice
slice / token.txt
Created November 12, 2021 05:20
interesting!
MzMxODI1ODE0MTg4NTg5MDY3.YY329g.B7YB8SFlzUtGmh5GoZWCIZ0JXkk
@slice
slice / owo.hs
Created February 12, 2021 14:07
module Main where
import Data.Char (isUpper, toLower)
isVowel :: Char -> Bool
isVowel = flip elem "aeiou"
wuhify :: Char -> Char
wuhify c
| c == 'r' = 'w'
@slice
slice / nitrochecker.py
Last active August 19, 2017 02:27
A Disco plugin for automatically checking rowboat join logs for users with Nitro.
import re
from disco.bot.command import CommandLevels
from disco.bot import Plugin, Config
JOIN_REGEX = re.compile(r'(:inbox_tray:|📥) (.+)#(\d{4}) \((\d+)\) joined ?(.+)')
class NitroCheckerConfig(Config):
joins_channel = None
ok_emoji = 'ya:318595000311087105'

Keybase proof

I hereby claim:

  • I am slice on github.
  • I am sliceofcode (https://keybase.io/sliceofcode) on keybase.
  • I have a public key whose fingerprint is 0AAE 88B3 A492 DCC1 0ABD D8F8 1508 C19D 7436 A26D

To claim this, I am signing this object:

@slice
slice / qwq.sh
Last active July 30, 2017 22:57
owo client for macos
#!/bin/bash
# -----------------------------------
# - qwq, light owo client for macos -
# -----------------------------------
#
# (c) slice 2017
# dependencies:
# - jq (brew install jq)
@slice
slice / install-background.sh
Last active March 24, 2017 04:28
Run this script in the background. A log file will be created at /b1n.log. Because we need to do this line by line, echo and log instructions should be left out since those are only for debugging. Define the functions too, but make it on one line like this: NAME() { BLAH }. Remember to leave out all log instructions and leave out >$LOG 2>&1.
echo "script will launch in background"
echo "cat /b1n.log to see progress"
LOG="/b1n.log"
# the log file we will be using
echo "*** $(date) script begin ***" > $LOG
log() {
echo "$*" >> $LOG
@slice
slice / explore.cc
Created February 20, 2017 22:08
really old code
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <map>
enum Item {
/* Useless stuff */
ITEM_SHOE, ITEM_SHIRT, ITEM_PANTS,