Skip to content

Instantly share code, notes, and snippets.

View Gewerd-Strauss's full-sized avatar

Gewerd-Strauss

  • Germany
View GitHub Profile
@anonymous1184
anonymous1184 / Ini.ahk
Last active May 15, 2024 13:37
Automatic configuration file handling.

; Version: 2023.04.20.1
; Usages and examples: https://redd.it/s1it4j
Ini(Path, Sync := true) {
return new Ini_File(Path, Sync)
}
class Ini_File {
@anonymous1184
anonymous1184 / Acc.ahk
Last active May 15, 2024 13:51
Acc.ahk
#Requires AutoHotkey v2.0
; Version: 2023.09.22.1
; https://gist.github.com/58d2b141be2608a2f7d03a982e552a71
; Private
Acc_Init(Function) {
static hModule := DllCall("LoadLibrary", "Str", "oleacc.dll", "Ptr")
return DllCall("GetProcAddress", "Ptr", hModule, "AStr", Function, "Ptr")
}
#Requires AutoHotkey v2.0
; Version: 2023.10.05.1
; https://gist.github.com/7cce378c9dfdaf733cb3ca6df345b140
GetUrl() { ; Active Window Only
static S_OK := 0, TreeScope_Descendants := 4, UIA_ControlTypePropertyId := 30003, UIA_DocumentControlTypeId := 50030, UIA_EditControlTypeId := 50004, UIA_ValueValuePropertyId := 30045
hWnd := WinGetID("A")
IUIAutomation := ComObject("{FF48DBA4-60EF-4201-AA87-54103EEF594E}", "{30CBE57D-D9D0-452A-AB13-7AC5AC4825EE}")
eRoot := ComValue(13, 0)
@anonymous1184
anonymous1184 / README.md
Last active January 19, 2024 04:58
WinHttpRequest.ahk

WinHttpRequest Wrapper

Usage and information: https://redd.it/mcjj4s

AutoHotkey v2.0

  • [WinHttpRequest.ahk]

AutoHotkey v1.1

@anonymous1184
anonymous1184 / HashFile.ahk
Last active December 24, 2023 14:46
Quick File Hashing

; Version: 2023.04.20.1
; Usages and examples: https://redd.it/m0kzdy
; Configuration ↓
wide := true ; Display the full hashes
; Enables/disabled algorithms
use := {}
`?` <- function(condition, result) {
if (missing(result)) return(
utils::`?`(deparse(substitute(condition)))
)
result <- substitute(result)
if (!is.call(result) || !identical(result[[1]], as.symbol(':'))) {
stop("Invalid syntax. Expected <condition> ? <if_true> : <if_false>", call. = FALSE)
}
eval(call("if", condition, result[[2]], result[[3]]))
}
@gadenbuie
gadenbuie / render_toc.R
Last active May 16, 2024 20:09
Generate Manual Table of Contents in (R)Markdown Documents
#' Render Table of Contents
#'
#' A simple function to extract headers from an RMarkdown or Markdown document
#' and build a table of contents. Returns a markdown list with links to the
#' headers using
#' [pandoc header identifiers](http://pandoc.org/MANUAL.html#header-identifiers).
#'
#' WARNING: This function only works with hash-tag headers.
#'
#' Because this function returns only the markdown list, the header for the
@johnatasjmo
johnatasjmo / source_files_from_folder.R
Created January 20, 2018 16:44
R - Source all files within folder
setwd("~/rProgramming")
files.sources = list.files()
sapply(files.sources, source)