Skip to content

Instantly share code, notes, and snippets.

View nperovic's full-sized avatar

Nikola nperovic

View GitHub Profile
@gitaarik
gitaarik / git_submodules.md
Last active July 23, 2024 12:21
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
#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)
@nperovic
nperovic / windows_API_Constants.code-snippets
Created March 6, 2024 06:14
Windows API Constants Snippet for VS Code
This file has been truncated, but you can view the full file.
{
"BCM_FIRST": {
"prefix" : "BCM",
"body" : "BCM_FIRST := 0x1600",
"description": "Windows - GUI - Controls - Button - Messages (Button Messages)"
},
"BCM_GETIDEALSIZE": {
"prefix" : "BCM",
"body" : "BCM_GETIDEALSIZE := 0x1601",
"description": "Windows - GUI - Controls - Button - Messages (Button Messages)"
@nperovic
nperovic / SetWindowColor.ahk
Last active July 18, 2024 13:42
Set the color of a window's caption, text, or border. This is supported starting with Windows 11 Build 22000.
#requires AutoHotkey v2
/**
* Sets the attributes of a window. Specifically, it can set the color of the window's caption, text, and border.
* @param {integer} hwnd Window handle.
* @param {integer} [titleText] Specifies the color(BGR) of the caption text. Specifying `0xFFFFFFFF` will reset to the system's default caption text color.
* @param {integer} [titleBackground] Specifies the color(BGR) of the caption. Specifying `0xFFFFFFFF` will reset to the system's default caption color.
* @param {integer} [border] Specifies the color(BGR) of the window border.
* - Specifying `0xFFFFFFFE` will suppress the drawing of the window border.
* - Specifying `0xFFFFFFFF` will reset to the system's default border color.
@nperovic
nperovic / Dark_MsgBox.ahk
Last active July 18, 2024 13:48
Apply dark theme to your built-in MsgBox and InputBox.
/************************************************************************
* @description Apply dark theme to the built-in MsgBox.
* @file Dark_MsgBox.ahk
* @link https://gist.github.com/nperovic/0b9a511eda773f9304813a6ad9eec137
* @author Nikola Perovic
* @date 2024/06/09
* @version 1.1.0
***********************************************************************/
#Requires AutoHotkey v2.1-alpha.13
#Module Dark_MsgBox