Skip to content

Instantly share code, notes, and snippets.

@ryunp
ryunp / RnD.txt
Last active September 6, 2015 06:55
/******************************************************************************\
Generalizations
\******************************************************************************/
All calculations must be rounded for non fractional pixel integer location
[Panels]
Width: Window Height / 0.49 (+0.001 for 16:9)
Height: Window Height
[Left Panel]
@ryunp
ryunp / bsod.ahk
Last active October 6, 2015 23:38
BSODtext := ["A problem has been detected and Windows has been shut down to prevent damage to your computer.", ""
, "The problem seems to be caused by the following file: SPCMDCON.SYS", ""
, "PAGE_FAULT_IN_NONPAGED_AREA", ""
, "If this is the first time you've seen this stop error screen, restart your computer. If this screen appears again, follow these steps:", ""
, "Check to make sure any new hardware or software is properly installed. If this is a new installation, ask your hardware or software manufacturer for any Windows updates you might need.", ""
, "If problems continue, disable or remove any newly installed hardware or software. Disable BIOS memory options such as caching or shadowing. If you need to use Safe Mode to remove or disable components, restart your computer, press F8 to select Advanced Startup Options, and then select Safe Mode.", ""
, "Technical information:", ""
, "*** STOP: 0x00000050 (0xFD3094C2,0x00000001,0xFBFE7617,0x00000000)", ""
, "*** SPCMDCON.SYS - Address FBFE7617 base
file := "bsodText.txt"
fourByThreeMode := 1
BGcolor := "0000C0"
DEBUG := 0
BSODTextArray := []
; Check for custom text or default back to orignal BSOD text
hFile := FileOpen(file, "r")
if (hFile.length()) {
while (line := hFile.ReadLine())
public void insertSortedList(List<String> list) {
// Take an array of strings in preorder and give me back a sorted binary
// tree
rootNode = sortedListToTree(list, 0, list.size() - 1);
}
// Each of these settings/computations is relative to the previous settings
// (function call). It starts by creating a single node and than attaches a
// left and right node who's values are a node returned from the function
// call.
@ryunp
ryunp / tts.ahk
Last active August 25, 2022 20:26
Text to Speech API
SAPI := ComObjCreate("SAPI.SpVoice")
SAPI.rate := 0 ; // Default. (-10) - 10
SAPI.volume := 100 ; // Default. 0 - 100
Text =
(Ltrim join!,
Never gonna give you up
Never gonna let you down
)
; ryunp 01/12/16
; Class/Encapsulated version.
; This will detect window focus changes.
; Hotkeys will enable and disable relative to window focus.
; Cute log window to show events
#Persistent
SetTitleMatchMode, RegEx
@ryunp
ryunp / bsod3.ahk
Last active January 10, 2016 15:34
; ryunp 01/10/16
; Oh christ allimaginary what have I created!
; [Instructions]
; This program looks for a file called "bsod.txt" for any custom text.
; Enter a trigger hotkey or string (character sequence) below.
; See https://autohotkey.com/docs/KeyList.htm for key combinations.
; [Options]
; CLASSIC_MODE - Emulates the classic graphic driver failure look: 4:3 ratio.
; DISABLE_TOGGLING - Toggling of BSOD screens with triggers. (EVIL_MODE)
; ryunp 01/12/16
; Class/Encapsulated version.
; This will detect window focus changes.
; Hotkeys will enable and disable relative to window focus.
; Cute little log window to show cute little events
#Persistent
SetTitleMatchMode, RegEx
@ryunp
ryunp / ptrs.c
Last active September 16, 2016 22:31
/**
* The Problem with Arrays and Functions
* An attempt to rationalize memory addressing and function parameters
* Author: Ryan Paul
* Date: 11/21/14
**/
/* Library includes */
#include <stdlib.h>
#include <stdio.h>
; Author: ryunp
; Date: 01/30/16
; Virtual key holder. Awesome GUI coniguration. #teamryunp
; This version has inlined files, JSON.ahk and HotkeyGUI.ahk
config := {hotkey: "F2", keys: ["3","4"]}
configFile := "config.json"
loadConfig()
initGUI()