Skip to content

Instantly share code, notes, and snippets.

View ahmad-511's full-sized avatar

Ahmad Murey ahmad-511

View GitHub Profile
@ahmad-511
ahmad-511 / utils.js
Last active April 25, 2023 05:24
General JS utility functions
// #1 Select first matched element
export function $(selector, elem) {
elem = elem || document;
return elem.querySelector(selector);
}
// #2 Select all matched elements
export function $$(selector, elem) {
elem = elem || document;
return elem.querySelectorAll(selector);
@ahmad-511
ahmad-511 / HeidiSQLDecrypt.bas
Created July 31, 2023 18:37
Decrypting HeidiSQL Password
1 ' Get your encrypted password from your registry Computer\HKEY_CURRENT_USER\SOFTWARE\HeidiSQL\Servers\
2 ' Open your connection node and find the Password key
3 ' You can try this on https://msxpen.com/
4 ' Credit to https://gist.github.com/jpatters/4553139 for the original version
10 CLS: COLOR 12, 1: KEY OFF
20 PRINT "Enter your encrypted password:"
30 LINE INPUT h$
40 st$ = ""
50 sh = VAL(RIGHT$(h$, 1))
60 h$ = LEFT$(h$, LEN(h$) -1)