Skip to content

Instantly share code, notes, and snippets.

@apfelchips
apfelchips / macOS-shortcuts.ahk
Last active October 8, 2024 00:19
First remap modifier keys with sharpkeys; AHK script has to run as Administrator to work on System Windows / Apps running as Administrator; see Watchdog ScheduledTask below, when you do this make sure to remove the inherited file permissions from C:/tools and only allow administrators write access.
#SingleInstance force
;#Persistent https://www.autohotkey.com/docs/commands/_Persistent.htm
;#InstallKeybdHook ; see: https://www.autohotkey.com/docs/v1/lib/_HotkeyModifierTimeout.htm
;#NoTrayIcon
TraySetIcon("accessibilitycpl.dll","6") ; Keyboard Icon
SetWorkingDir(A_ScriptDir) ; Ensures a consistent starting directory.
; Debugging
; #Warn All, OutputDebug ; Show Warnings in DebugView ( https://learn.microsoft.com/en-us/sysinternals/downloads/debugview )
@garaud
garaud / pipe-to-emacs.py
Last active October 18, 2024 13:50
Pipe to Emacs: Insert a result from an UNIX command into a new Emacs buffer
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Author: Damien Garaud
# Date: 2014-2015
# License: Simplified BSD
"""Allow you to pipe command results into an Emacs buffer. Suppose you have an
Emacs server since you launch 'emacsclient'.