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 ---
@G33kDude
G33kDude / EasyStreamDeck.ahk
Created March 12, 2022 19:20
Launch AutoHotkey code from a StreamDeck efficiently using GET requests
#NoEnv
#Persistent
SetBatchLines, -1
#Include <Socket>
/*
Launch AutoHotkey code from a StreamDeck efficiently using GET requests

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

#NoEnv
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
#NoEnv
SetBatchLines, -1
#Include <Socket>
MATRIC_CONFIG_PATH := A_Desktop "\..\Documents\.matric\config.json"
APP_NAME := "AutoHotkey"
API_PORT := 50300
RESP_PORT := 50301
@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 / FixIE.ahk
Last active October 1, 2022 03:09
Force embedded IE (shell.explorer) to use a better render engine
FixIE(Version=0, ExeName="")
{
static Key := "Software\Microsoft\Internet Explorer"
. "\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"
, Versions := {7:7000, 8:8888, 9:9999, 10:10001, 11:11001}
if Versions.HasKey(Version)
Version := Versions[Version]
if !ExeName
// ==UserScript==
// @name Code box to CodeQuickTester
// @namespace https://github.com/G33kDude
// @version 0.6
// @description Adds a button to open AHKScript code boxes in CodeQuickTester
// @author GeekDude
// @match *://autohotkey.com/boards/viewtopic.php*
// @grant none
// @updateURL https://gist.github.com/G33kDude/d3d9e4fd7c739dab3527/raw/CodeBox2QuickTest.user.js
// ==/UserScript==
@G33kDude
G33kDude / life.ahk
Last active February 28, 2022 00:00
Game of Life for Discord competition
#Include precode.ahk
global W=20,H=20,b=[]
OnCellAlive(x,y){
OnCellDead(x,y,1)
}OnCellDead(x,y,n=0){
SetCell(x,y,b[x,y]:=n)
}SetupBoard(W,H)
r::
i:=0,c=[]
while i<W*H,n=-s:=b[x:=mod(i,W),y:=i++//W],j=0{
@G33kDude
G33kDude / Rogue2.ahk
Last active January 24, 2022 03:55
Version 2 of the previous Rogue script. For the second step of the rogue challenge for /r/DailyProgrammer
Width := 20, Height := 20
KeyMap := {"up": "up", "left": "left", "down": "down", "right": "right"}
Map := [], BlankSquares := []
Loop, % Width
{
x := A_Index
Loop, % Height
{
y := A_Index