Skip to content

Instantly share code, notes, and snippets.

View pa-0's full-sized avatar

Peter Abbasi pa-0

  • Chicago
  • 01:35 (UTC -05:00)
View GitHub Profile
@pa-0
pa-0 / Jump_To_Folder.ahk
Created September 12, 2024 19:05 — forked from in03/Jump_To_Folder.ahk
Creates a quick nav menu in any Windows browser dialog based on open explorer windows - trigger with Ctrl+G or middle mouse button
; Easy Access to Currently Opened Folders
; Original author: Savage
; Fork by Leeroy
; Invoke a menu of currently opened folders when you click
; the middle mouse button inside Open / Save as dialogs or
; Console (command prompt) windows. Select one of these
; locations and the script will navigate there.
; CONFIG: CHOOSE A DIFFERENT HOTKEY
; You could also use a modified mouse button (such as ^MButton) or
@pa-0
pa-0 / ManageContextMenu.bat
Created September 12, 2024 03:45 — forked from dogancelik/ManageContextMenu.bat
Quick Access Menu Context Menu Install / Uninstall #Windows
@echo off
set "reg_wildcard=HKEY_CLASSES_ROOT\*\shell\"
set "reg_desktop_bg=HKEY_CLASSES_ROOT\DesktopBackground\Shell\"
set "reg_dir_bg=HKEY_CLASSES_ROOT\Directory\Background\shell\"
set "reg_folder=HKEY_CLASSES_ROOT\Folder\shell\"
set "reg1=Add File to Quick Access Popup menu"
set "reg2=Add File to Quick Access Popup menu Express"
set "reg3=Show Quick Access Popup menu"
@pa-0
pa-0 / rewriting-git-history.md
Created September 9, 2024 23:46 — forked from cerebrl/rewriting-git-history.md
Understand how rewriting history with `git amend` and `git rebase` can be crucial in keeping your Git logs clean and simple, while avoiding some dangerous consequences.

Rewriting Git History

Say you have a code base that you just created and you have two commits locally:

commit a
commit b

This is your “version history”. You then push these commits to your remote. Now you have two repos with the same history:

@pa-0
pa-0 / git-rewrite
Created September 9, 2024 23:46 — forked from ericfreese/git-rewrite
Git script to rewrite history in various ways
#!/bin/env zsh
# Run an interactive rebase, automatically marking $1 to be reworded
function git_rewrite_reword() {
GIT_SEQUENCE_EDITOR="sed -ie 's/pick $1/reword $1/'" \
git rebase -i --autostash $1^
}
# Run an interactive rebase, automatically marking $1 to be edited
function git_rewrite_edit() {
@pa-0
pa-0 / create-new-file.ahk
Created September 8, 2024 13:01 — forked from aborruso/create-new-file.ahk
AutoHotKey: Create a new file with Alt+N keyboard shortcut in Windows Explorer
; This is part of my AutoHotKey [1] script. When you are in Windows Explorer it
; allows you to press Alt+N and type a filename, and that file is created
; in the current directory and opened in the appropriate editor (usually
; [gVim](http://www.vim.org/) in my case, but it will use whatever program is
; associated with the file in Windows Explorer).
; This is much easier than the alternative that I have been using until now:
; Right click > New > Text file, delete default filename and extension (which
; isn't highlighted in Windows 7), type the filename, press enter twice.
; (Particularly for creating dot files like ".htaccess".)
@pa-0
pa-0 / create-new-file.ahk
Created September 8, 2024 13:01 — forked from aubricus/create-new-file.ahk
AutoHotkey script to create a new file.
; create new file
; installation:
; 1. you must be running autohotkey: http://www.autohotkey.com
; 2. double click on script to run
; [pro-tip] add this script to your startup folder to run when windows start
; [pro-top] you can add this script to another .ahk script file.
; hotkey is set to control + alt + n
; more on hotkeys: http://www.autohotkey.com/docs/Hotkeys.htm
@pa-0
pa-0 / txt.wrap.ahk
Created September 7, 2024 22:23 — forked from davebrny/txt.wrap.ahk
✏️ (autohotkey) - wrap selected text in *symbols*
/*
[wrap list]
( = (TXT)
`[ = [TXT]
{ = {TXT}
< = <TXT>
> = >TXT<
a = /`*TXT*`/
h = <!-- TXT -->
@pa-0
pa-0 / disable LUA
Created September 7, 2024 22:07 — forked from thiagopilz/disable LUA
Disable_UAC.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"ConsentPromptBehaviorAdmin"=dword:00000000
"EnableLUA"=dword:00000000
@pa-0
pa-0 / comic2cbz
Created September 7, 2024 22:07 — forked from gotbletu/comic2cbz
comic2cbz - convert images to webp at 50% quality and create cbz (comicbook archive)"
#!/usr/bin/env bash
# AUTHOR: gotbletu (@gmail|twitter|youtube|github|lbry)
helpmsg() {
printf "%s\n" "desc: convert images to webp at 50% quality and create cbz (comicbook archive)"
printf "%s\n" "depend: imagemagick zip coreutils libwebp"
printf "\n"
printf "%s\n" "usage: ${0##*/} <image>"
printf "\n"
printf "%s\n" " $ ${0##*/} *.png"
@pa-0
pa-0 / shield.cs
Created September 7, 2024 22:07 — forked from lextm/shield.cs
Add/Remove shield icon to/from WinForms Button
using System;
// ReSharper disable InconsistentNaming
namespace JexusManager
{
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security.Principal;
using System.Windows.Forms;