Usage and information: https://redd.it/mcjj4s
- [WinHttpRequest.ahk]
| |
; 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 { |
#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) |
Usage and information: https://redd.it/mcjj4s
| |
; 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]])) | |
} |
#' 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 |
setwd("~/rProgramming") | |
files.sources = list.files() | |
sapply(files.sources, source) |
# restore_packages.R | |
# | |
# installs each package from the stored list of packages | |
# source: http://hlplab.wordpress.com/2012/06/01/transferring-installed-packages-between-different-installations-of-r/ | |
load("~/installed_packages.rda") | |
for (count in 1:length(installedpackages)) { | |
install.packages(installedpackages[count]) | |
} |