Skip to content

Instantly share code, notes, and snippets.

View GageSorrell's full-sized avatar

Gage Sorrell GageSorrell

View GitHub Profile
@GageSorrell
GageSorrell / Win32MessageLoopNodeAddonApi.cpp
Last active January 24, 2024 10:27
Create a Windows API (Win32) message loop with the node-addon-api.
/* Gist: Win32 Message Loop with `node-addon-api`
* Author: Gage Sorrell <gsorrell@purdue.edu>
* Copyright: (c) 2023 Gage Sorrell
* License: MIT
*/
/* This file demonstrates how to get access to the Windows API (Win32)
* message loop in your NodeJS application via node-addon-api.
* This code goes into your node-addon-api package, with no additional
* build tools necessary.
@Arax20
Arax20 / ptRun.ahk
Last active May 26, 2024 07:40
Allows rebinding of winkey to a shortcut without getting in the way of system winkey shortcuts.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
LWin::
Input, x, L1 ; Catches key after winkey
if (ErrorLevel = "NewInput") ; If catching was interrupted
{
Send #+r ; Set this to your powertoys run shortcut
VC_redist.x64.exe /q
Engine\Extras\Redist\en-us\UE4PrereqSetup_x64.exe /q