Skip to content

Instantly share code, notes, and snippets.

View simonLeary42's full-sized avatar

Simon Leary simonLeary42

  • UMass Amherst Research Computing
  • 22:29 (UTC -04:00)
View GitHub Profile
@simonLeary42
simonLeary42 / rdrd2_cook_online.ahk
Created July 31, 2026 11:54
cooking in red dead redemption 2 with autohotkey
; Simon Leary
; 12/31/2021
; when you go to cook, as you click on the item to cook, press scrollLock to keep cooking
; to stop press scrollLock again
#maxthreadsperhotkey 2
ScrollLock::
{
  • x - delete character
  • d... - delete motion
  • dd - delete line (or 2dd for 2 lines)
  • y... - copy motion (yank)
  • yy - yank line (or 2yy for 2 lines)
  • p / P - paste (put) (p after cursor, P before cursor)
  • u - undo
  • U - undo all changes on line
  • <C-r> - redo
  • r... replace current character
@simonLeary42
simonLeary42 / git-move-submodule.md
Last active August 5, 2026 13:29
how to move a git submodule
  • edit .gitmodules > [submodule "path/to/submodule"]
  • edit .git/config > [submodule "path/to/submodule"]
  • edit path/to/submodule/.git > gitdir
  • edit .git/modules/path/to/submodule/config > worktree
  • move .git/modules/path/to/submodule to its new path
#!/bin/bash
# source me into your shell!
_readline_region_active_navigation_activate_navigation_hook=''
_readline_region_active_navigation_exchange_point_and_mark_raw=''
function _readline_region_active_navigation() {
# use ugly globals because variable becomes unset before _readline_setup_navigation_hook() runs
declare -n activate_navigation_hook=_readline_region_active_navigation_activate_navigation_hook
declare -n exchange_point_and_mark_raw=_readline_region_active_navigation_exchange_point_and_mark_raw
def fmt_table(
table, between_column_padding_size=5, alternate_brightness=True, left_padding_size=0
):
output_lines = []
assert all(
len(row) <= len(table[0]) for row in table
), "no row can have more elements than the header row"
column_widths = [0] * len(table[0])
for row in table:
import re
import sys
import json
from json import JSONDecodeError
from urllib import request
from urllib.error import HTTPError
from http.client import HTTPResponse
"""
helps locate release files from github
<table>
<tr>
<th>End Date:</th>
<td>
<a href="">
<span><i class="fas fa-redo-alt" aria-hidden="true"></i>
Expires in {{ allocation.expires_in }} day{{ allocation.expires_in|pluralize }} - Click to renew
</span>
</a>
</td>
import requests
import urllib.parse
import xml.etree.ElementTree as ET
from ansible.errors import AnsibleError
from ansible.utils.display import Display
from ansible.plugins.lookup import LookupBase
DOCUMENTATION = """
name: incommon_scopes
author: Simon Leary <simon.leary42@proton.me>
import logging
from typing import Any, List
from ldap3 import BASE, MODIFY_ADD, MODIFY_DELETE, MODIFY_REPLACE, Connection
from ldap3.core.exceptions import LDAPException
from ldap3.utils.log import ERROR, set_library_log_detail_level
"""
wrapper interface for ldap3
sacrifices performance for simlicity