Skip to content

Instantly share code, notes, and snippets.

View Lorenzo501's full-sized avatar
🐲
Making dreams come to life!

Lorenzo Pappalettera Lorenzo501

🐲
Making dreams come to life!
View GitHub Profile
/*
This is a productivity enhancer plus some quality-of-life features that takes care of tedious tasks for you, saving time for what matters. Click on the tray icon to view hotkey info.
You'll find an embedded INI at the bottom of this script. However, you have to follow these two steps before you can run this script:
Download and unzip archive in "Lib" folder: https://github.com/thqby/winrt.ahk
Download raw file into "Lib" folder: https://github.com/Descolada/UIA-v2/blob/main/Lib/UIA.ahk
********** EIGHT-HOTKEY REMOTE **********
Multi- and single-function hotkeys
TIP: change the `Run` setting to `Maximize` in the properties wnd of the Paint shortcut (b/c the snip feature can open Paint in a small wnd, which will be remembered by the OS).
And go to `Settings > System > Focus assist` to turn off all `Automatic rules`, so that TrayTip notification banners can also be shown on the desktop wnd for example
/*
Simply go to the properties of the VSCode web app icon in the taskbar and set these values:
Target: "%UserProfile%\Downloads\AutoHotkey\Open VSCode Web Editor With Recent Folder.ahk"
Start in: %UserProfile%\Downloads\AutoHotkey
*/
#Requires AutoHotkey 2.0
#SingleInstance Ignore
#NoTrayIcon
Persistent()
A_WinDelay := -1
<!--
Open the HTML file, copy the link and paste into the "Thunderbird Start Page" setting of the mail app
-->
<html>
<head>
<style>body { margin: 0; background: linear-gradient(to bottom, #B9CAD4 30%, #EED4AB); height: 100vh; }</style>
</head>
</html>
/*
This multi-purpose script is meant to be used via pinned taskbar icons and you can even have Tabs Outliner minimized at the startup of your computer
IMPORTANT: install the Tabs Outliner extension: https://chromewebstore.google.com/detail/tabs-outliner/eggkanocgddhmamlbiijnphhppkpkmkl
Go to the Tabs Outliner options and then go to the general tab and put a checkmark next to: `Open Tabs Outliner window on Chrome startup.`
Go to the Tabs Outliner shortcuts and set Alt+X as the shortcut for `Activate the extension` (chrome://extensions/shortcuts)
EDUCATIONAL: regarding WinEvents, check out my Chrome Watcher tools: https://github.com/Lorenzo501/Lorenzo501/blob/main/My%20Projects%20(Extra)/Educational/Chrome%20Watcher/README.md
Move this script to: %UserProfile%\Downloads\AutoHotkey
Go to the properties of the Chrome icon in the taskbar and set these values:
Target: "%UserProfile%\Downloads\AutoHotkey\Minimized Tabs Outliner.ahk" --duo
/*
This script fixes numerous bugs and has a few quality-of-life features
*/
#Requires AutoHotkey 2.0
; Any attempt to launch this script when it's already running is allowed (the dialog box that normally appears in this situation gets skipped). Sometimes necessary for restarting gw2
#SingleInstance Off
A_DetectHiddenWindows := true
; The non-UIA instance runs gw2 elevated and then becomes an UIA instance if there isn't one already, to make it work when the active gw2 window is elevated

Fork Privately

https://github.com/new/import

Undo Latest Commit

Press . on a repo webpage to open it in github.dev, go to the terminal, click on the btn to open GitHub Codespaces, click on the option 2 cores, 8 GB RAM, 32 GB storage, open the terminal there, copy & paste the following (it will show the pending change and asks you to confirm before it deletes the previous commit entirely, even from history):

git reset --hard HEAD~1  
git push origin -f
#Requires AutoHotkey 2.0
#NoTrayIcon
#HotIf WinActive("ahk_exe uTorrent.exe")
~RButton::
{
static status := 0
if (!status)
OnClipboardChange(HandleClipChanged, status := 1)