Skip to content

Instantly share code, notes, and snippets.

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 / bb-grades-export.js
Created May 3, 2019
Exports grades from your student blackboard grade center
View bb-grades-export.js
let doc = document;
if (doc.querySelector('iframe#mybbCanvas')) {
doc = doc.querySelector('iframe#mybbCanvas')
let download = function(title, text) {
View MarkdownToBBCode.ahk
SetBatchLines, -1
Gui, Add, Button, gDoConversion, Convert from Markdown to BBCode
Gui, Add, Edit, w640 h480 vPost
Gui, Show
G33kDude /
Last active Apr 18, 2021
Stream a webcam over HTTP using the MJPEG protocol
#!/usr/bin/env python2
import time
import BaseHTTPServer
import SimpleHTTPServer
import SocketServer
import threading
G33kDude / BlackboardDismissAll.user.js
Last active Dec 17, 2017
Userscript to add a "Dismiss All" button to the Blackboard Learn updates page
View BlackboardDismissAll.user.js
// ==UserScript==
// @name Blackboard Dismiss All Updates
// @namespace
// @version 0.1
// @description Adds a "Dismiss All" button to the Blackboard Learn updates page
// @author GeekDude
// @match *://**
// @grant none
// @update
// ==/UserScript==
G33kDude / HideQuickLogout.user.js
Last active Aug 9, 2017
Hides the quick logout button for the AutoHotkey forums
View HideQuickLogout.user.js
// ==UserScript==
// @name Hide quick logout
// @namespace
// @version 0.1
// @description Hides the quick access logout button in the toolbar next to the notifications
// @author GeekDude
// @match *://*
// @grant none
// @updateURL
// ==/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

View Volume.ahk
SetBatchLines, -1
#MaxHotkeysPerInterval 200
#Include <VA>
; Create the slider window
Gui, Add, Progress, w100 h20 x0 y0 Range0-100 vVolSlider, 0
Gui, Add, Text, w100 h20 x0 y0 vVolText BackgroundTrans Center +0x200, 0
Gui, +AlwaysOnTop -Caption +ToolWindow
Gui, Show, Hide w100 h20 x0 y0, Volume

Making a read-only ev3dev system

Mounting ev3dev.img

Start by downloading the latest ev3dev release from

Once downloaded, set it up as a loop device. Find out what the first unused loop device is by running losetup -f. This tells you which loop device will be used once set up. On my system, it printed /dev/loop0. Now we can run the command to actually set up the loop device:

View Array_Gui.ahk
Array_Gui(Array, Parent="") {
if !Parent
Gui, +HwndDefault
Gui, New, +HwndGuiArray +LabelGuiArray +Resize
Gui, Margin, 5, 5
Gui, Add, TreeView, w300 h200
Item := TV_Add("Array", 0, "+Expand")
Array_Gui(Array, Item)