Skip to content

Instantly share code, notes, and snippets.

G33kDude / synaptics.ahk
Last active Jan 10, 2021
Synaptics Touchpad Toggle
View synaptics.ahk
; Script to turn the Synaptics Touchpad on and off. Useful for laptops with
; Synaptic touchpads that do not have dedicated touchpad on/off buttons. I use
; this code to quickly toggle on and off the touchpad on my Lenovo Thinkpad,
; where I primarily use the TrackPoint.
; API Reference
; Constants
View day3.ahk
SetBatchLines, -1
map := FileOpen(A_Desktop "\day3.txt", "r").Read()
map := StrSplit(map, "`n", "`r")
; --- Part 1 ---
for y, row in map
View MATRIC.ahk
SetBatchLines, -1
#Include <Socket>
MATRIC_CONFIG_PATH := A_Desktop "\..\Documents\.matric\config.json"
APP_NAME := "AutoHotkey"
API_PORT := 50300
RESP_PORT := 50301
View Print.ahk
Print(obj, quote:=False, end:="`n")
static cout:=FileOpen("*", "w")
, escapes := [["``", "``" "``"], ["""", """"""], ["`b", "``b"]
, ["`f", "``f"], ["`r", "``r"], ["`n", "``n"], ["`t", "``t"]]
if IsObject(obj)
for k in obj
is_array := k == A_Index
until !is_array
View Gson.ahk
static dom, window
if window
return window
dom := ComObjCreate("htmlfile")
dom.write("<meta http-equiv='X-UA-Compatible'content='IE=edge'><script>
( Comment

AutoHotkey Formatting Guidelines

Global Variables:

  • Should be constants, in ALL_CAPS
  • Or variables prefixed with _underscore

Constant values should be in ALL_CAPS other variables should be snake_case or camelCase

Functions and Methods should be PascalCase

G33kDude /
Last active Mar 22, 2020
System wide tooltips using python 3
#!/usr/bin/env python3
import time
import ctypes
from ctypes import wintypes
import struct
import threading
# --- Windows API Setup ---

Reverse Proxy Calibre-Web Container with Different Base URL

When using Calibre-Web from Docker, the most popular container doesn't offer an obvious way to set up a reverse proxy under a different base URL. It's simple to do by writing a request header in your reverse proxy config, as demonstrated below.