Skip to content

Instantly share code, notes, and snippets.

@G33kDude
G33kDude / tooltips.py
Last active April 11, 2024 05:13
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.

Apache

#!/bin/bash
old="0"
while true; do
if [[ -e /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode ]]; then
new=`cat /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode`
if [[ $new != $old ]]; then
if [[ $new == "1" ]]; then
echo "Rotate to landscape"
xsetwacom set "Wacom Serial Penabled Pen stylus" rotate half
@G33kDude
G33kDude / bb-grades-export.js
Created May 3, 2019 21:42
Exports grades from your student blackboard grade center
(function(){
let doc = document;
if (doc.querySelector('iframe#mybbCanvas')) {
doc = doc.querySelector('iframe#mybbCanvas')
.contentDocument.querySelector('iframe#right_stream_mygrades')
.contentDocument;
}
let download = function(title, text) {
#NoEnv
SetBatchLines, -1
Gui, Add, Button, gDoConversion, Convert from Markdown to BBCode
Gui, Add, Edit, w640 h480 vPost
Gui, Show
return
GuiClose:
ExitApp
@G33kDude
G33kDude / mjpeg.py
Last active January 5, 2023 11:19
Stream a webcam over HTTP using the MJPEG protocol
#!/usr/bin/env python2
import time
# HTTP
import BaseHTTPServer
import SimpleHTTPServer
import SocketServer
import threading
@G33kDude
G33kDude / BlackboardDismissAll.user.js
Last active December 17, 2017 15:38
Userscript to add a "Dismiss All" button to the Blackboard Learn updates page
// ==UserScript==
// @name Blackboard Dismiss All Updates
// @namespace https://github.com/G33kDude
// @version 0.1
// @description Adds a "Dismiss All" button to the Blackboard Learn updates page
// @author GeekDude
// @match *://*.blackboard.com/webapps/streamViewer/streamViewer*
// @grant none
// @update https://gist.github.com/G33kDude/4ef48d78fde6cb07490a1c1de3ba79d0/raw/BlackboardDismissAll.user.js
// ==/UserScript==
@G33kDude
G33kDude / HideQuickLogout.user.js
Last active August 9, 2017 14:25
Hides the quick logout button for the AutoHotkey forums
// ==UserScript==
// @name Hide quick logout
// @namespace https://github.com/G33kDude
// @version 0.1
// @description Hides the quick access logout button in the toolbar next to the notifications
// @author GeekDude
// @match *://autohotkey.com/boards/*
// @grant none
// @updateURL https://gist.github.com/G33kDude/9f9ec5281a8d574847ca28540425343b/raw/HideQuickLogout.user.js
// ==/UserScript==

GeekDude's Tips, Tricks, and Standalones

This is intended to be a useful reference for any AutoHotkey scriptwriter regardless of their experience. If you find any of the examples to be confusing please let me know so I can update them for clarity.

Table of Contents