Skip to content

Instantly share code, notes, and snippets.

@jdleslie
jdleslie / citrix_ctrl_alt_win.json
Last active February 9, 2024 18:41
Map Apple modifiers (Ctrl, Option, Command) to Windows modifiers (Ctrl, Win, Alt) in Citrix Workspace using Karabiner Elements, with working Alt+Tab and Windows key shortcuts
{
"title": "Citrix Receiver/Workspace modifiers for Ctrl, Alt, Windows order",
"rules": [
{
"description": "In Citrix, add fn modifier to tab so it is forwarded",
"manipulators": [
{
"from": {
"key_code": "tab",
"modifiers": { "optional": [ "any" ] }
@jdleslie
jdleslie / Makefile
Last active November 10, 2017 18:15
Convert X11R6 bitmap fonts to Python PIL format
PILFONT ?= pilfont.py
BUILD ?= build
BROKEN ?= broken
FONT_PATH ?= xc/fonts/bdf/75dpi xc/fonts/bdf/misc xc/fonts/bdf/unnec_75dpi
FONT_BDF := $(shell find $(FONT_PATH) -name "*.bdf" -exec basename {} \;)
ifneq ($(wildcard $(BROKEN)),)
FONT_IGNORE := $(shell cat $(BROKEN))
FONT_BDF := $(filter-out $(FONT_IGNORE),$(FONT_BDF))
endif
@jdleslie
jdleslie / radiant.py
Last active November 8, 2017 02:04
Forecast-responsive control script for radiant floors
import logging
import os
from datetime import datetime, timedelta
import requests
import xmltodict
import pytz
TZ = os.environ.get("RADIANT_TZ", "UTC")
LAT = float(os.environ.get("RADIANT_LAT"))