Skip to content

Instantly share code, notes, and snippets.

View tremby's full-sized avatar

Bart Nagel tremby

View GitHub Profile
@tremby
tremby / closest_named_colour.py
Last active June 10, 2022 06:47 — forked from scholich/closest_named_color.py
Get the closest named color to a hex or triple RGB value from the XKCD color naming survey, see http://xkcd.com/color/rgb/.
#!/usr/bin/env python
"""Get closest named colour according to XKCD's colour naming survey
`http://xkcd.com/color/rgb/`.
rgb.txt from `http://xkcd.com/color/rgb.txt` must reside alongside this script.
Exceptions are made for true black and true white: these are omitted from the
searched colours. "black" and "white" are returned only if the queried colour is
true black or true white.
@tremby
tremby / Dvorak-LCD.kbd.json
Last active November 17, 2016 01:09 — forked from quince/Dvorak-option_.kbd.json
Dvorak LCD
[
{
"backcolor": "#ffffff",
"name": "Dvorak LCD",
"author": "Bart Nagel",
"background": {
"name": "Maple orange",
"style": "background-image: url('/bg/wood/maple-orange.jpg');"
},
"switchMount": "alps",
@tremby
tremby / 00 command sequece
Last active April 16, 2016 20:16 — forked from myitcv/00 command sequece
Gitlab frozen mailroom diagnostics
# Step 01
# per https://gitlab.com/gitlab-org/gitlab-ce/issues/13357#note_4857268
gdb
attach <PID>
redirect_stdout
eval("puts Kernel.caller.join(\"\\n\")")
# Step 02
gdb
attach <PID>