Skip to content

Instantly share code, notes, and snippets.

@metayan
metayan / gamepad-test.lisp
Created February 16, 2020 10:25
WingMan RumblePad settings for cl-gamepad on Darwin
(in-package :cl-user)
(ql:quickload :cl-gamepad)
(rename-package :org.shirakumo.fraf.gamepad :org.shirakumo.fraf.gamepad '(:gamepad))
(gamepad:init)
(defparameter d (car (gamepad:list-devices)))
;; to configure WingMan RumblePad:
(gamepad:configure-device d :button-labels #(:A :B :C :X :Y :Z :SELECT :L1 :R1)
:axis-labels #(:DPAD-H :DPAD-V :L-H :L-V :R-H :R-V :THROTTLE))
@metayan
metayan / sshfs-leaks.sh
Created September 17, 2023 14:14
List sshfs leaks on macOS
for p in $(ps ax |egrep sshfs |egrep -v egrep| awk '{print $1}'); do \
printf "%s\t%6s\n" \
$(ps -o command= $p |cut -d: -f 2- |cut -d ' ' -f 2) \
$(leaks $p |egrep TOTAL |cut -d ')' -f 1 |cut -d '(' -f 2 ); \
done
@metayan
metayan / kitty-macos-catalina-build.sh
Created December 10, 2023 00:49
kitty-macos-catalina-build
# When building kitty on macOS Catalina (10.15.7), this error appears:
# -------------------------------------------------------
# make
# python3 setup.py
# [15/61] Compiling kitty/cocoa_window.m ... done
# Compiling [cocoa] glfw/cocoa_window.m ...
# clang -MMD -DNDEBUG -D_GLFW_COCOA -D_GLFW_BUILD_DLL -DGL_SILENCE_DEPRECATION -Wextra -Wfloat-conversion \
# -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11 -pedantic-errors -Werror -O3 -fwrapv \
# -fstack-protector-strong -pipe -march=native -fvisibility=hidden -
# D_FORTIFY_SOURCE=2 -fcf-protection=full -flto -fPIC -c glfw/cocoa_window.m -o build/glfw-cocoa-cocoa_window.m.o