Skip to content

Instantly share code, notes, and snippets.

View mahmoudimus's full-sized avatar
💭
@_@

Mahmoud Rusty Abdelkader mahmoudimus

💭
@_@
View GitHub Profile
@mahmoudimus
mahmoudimus / base256.py
Created February 11, 2025 19:37
dumb base256 encoding
import re
class Base256:
def __init__(self):
self.list = [['aardvark','adroitness'],['absurd','adviser'],['accrue','aftermath'],['acme','aggregate'],['adrift','alkali'],['adult','almighty'],['afflict','amulet'],['ahead','amusement'],['aimless','antenna'],['Algol','applicant'],['allow','Apollo'],['alone','armistice'],['ammo','article'],['ancient','asteroid'],['apple','Atlantic'],['artist','atmosphere'],['assume','autopsy'],['Athens','Babylon'],['atlas','backwater'],['Aztec','barbecue'],['baboon','belowground'],['backfield','bifocals'],['backward','bodyguard'],['banjo','bookseller'],['beaming','borderline'],['bedlamp','bottomless'],['beehive','Bradbury'],['beeswax','bravado'],['befriend','Brazilian'],['Belfast','breakaway'],['berserk','Burlington'],['billiard','businessman'],['bison','butterfat'],['blackjack','Camelot'],['blockade','candidate'],['blowtorch','cannonball'],['bluebird','Capricorn'],['bombast','caravan'],['bookshelf','caretaker'],['brackish','celebrate'],['breadline','cellulose'],['br
@mahmoudimus
mahmoudimus / change-default-open.md
Last active January 17, 2025 18:58
Allows one to change the default file handler for `public.data` content types on Mac OS
bundleid=$(mdls <APP_PATH_HERE> | grep kMDItemCFBundleIdentifier | cut -d'"' -f2)

defaults write com.apple.LaunchServices LSHandlers -array-add \
     "{ LSHandlerContentType = \"public.data\"; LSHandlerRoleAll = \"$bundleid\"; };"
@mahmoudimus
mahmoudimus / EmacsClient.applescript
Last active January 17, 2025 18:24
An AppleScript that allows Automator to open a file via emacsclient
-- Function to check if a file exists and is executable
on fileExistsAndExecutable(thePath)
try
do shell script "test -x " & quoted form of thePath
return true
on error
return false
end try
end fileExistsAndExecutable
@mahmoudimus
mahmoudimus / log_mutations.js
Created December 10, 2024 22:07
Log all mutations to a particular node
// Select the node that will be observed for mutations
// Options for the observer (which mutations to observe)
const config = {attributes: true, childList: true, subtree: true};
const htmlify = xs => xs && [...xs].map(x => x.innerHTML)
let counter = 0
// Callback function to execute when mutations are observed
const callback = function (mutationsList, observer) {
@mahmoudimus
mahmoudimus / stop-cheatengine-laugh.bat
Last active August 9, 2024 19:31
Cheat Engine's Creepy Laughter on Windows Mahmoud Abdelkader (aka mahmoudimus)
@echo off
REM Place this file into the cheat engine directory and run it.
REM
REM If you've downloaded Cheat Engine and installed it from a non-standard installer,
REM you might periodically hear a creepy man's laugh lasting three seconds or so. It
REM seems like it might be a virus, malware or something untoward but it is not. It
REM turns out, for non-Patreon users, cheat engine software has a two-stage installer.
REM
REM The first stage is basically adware. The second stage downloads the actual
REM installer, which can malfunction if not launched by the ad-filled installer.
@mahmoudimus
mahmoudimus / keybinder.py
Last active August 2, 2024 18:05
Exploiting IDA Pro's Qt 5.5 Keybindings For Emacs-like Mnemonic Keybindings
"""
Further updates located at https://github.com/mahmoudimus/ida-keybinder
Mahmoud Abdelkader
"""
import re
import sys
from PyQt5 import QtWidgets
@mahmoudimus
mahmoudimus / Lua to Visual Studio tuto.txt
Created July 23, 2024 20:05
Compiling Lua in Visual Studio
Preparation
1 - Download lua source in https://www.lua.org/download.html
2 - Unpack (use 7-zip)
3 - Create an C:\src\lua
4 - In C:\src\lua create dirs: include, lib, bin and doc
5 - Copy 'doc' from lua.tar.gz to C:\src\lua\doc
6 - Copy all files from lua.tar.gz src, to C:\src\lua\include
Creating a .lib and .dll
1 - Create a new blank project in Visual Studio
@mahmoudimus
mahmoudimus / ODbgScript.txt
Created July 13, 2024 05:43 — forked from trietptm/ODbgScript.txt
ODbgScript.txt
-------------------------------
ODbgScript english plugin by E3
site : http://odbgscript.sf.net
-------------------------------
1. About OllyScript and ODbgScript
2. Status
2.1 What's new?
3. Documentation
3.1 Language
@mahmoudimus
mahmoudimus / endianness.h
Created July 12, 2024 04:59 — forked from jtbr/endianness.h
cross-platform / cross-compiler standalone endianness conversion
/**
* @file endianness.h
* @brief Convert Endianness of shorts, longs, long longs, regardless of architecture/OS
*
* Defines (without pulling in platform-specific network include headers):
* bswap16, bswap32, bswap64, ntoh16, hton16, ntoh32 hton32, ntoh64, hton64
*
* Should support linux / macos / solaris / windows.
* Supports GCC (on any platform, including embedded), MSVC2015, and clang,
* and should support intel, solaris, and ibm compilers as well.
@mahmoudimus
mahmoudimus / leaderkeyideas.md
Last active July 10, 2024 17:18
Emacs Key Leader Keys

Obviously the normal ones are: Ctrl-x, Ctrl-u

Alt can be a good leader prefix. Alt-x is emacs-extended-command. Alt-m is used by spacemacs.

Visual Studio has Ctrl-k, Ctrl-e, but IMO, they are not good. Those are very "hot" keys that are used all the time

Tmux has Ctrl-b, which is almost always rebound to Ctrl-a for memory compatibility with Screen's Ctrl-a. It's also not good IMO, but Tmux is used very often that it is reasonable to include Ctrl-a as a leader key.

One I've started playing with is Ctrl-Insert - it has almost no conflicts. There are also Ctrl-Numlock and Ctrl-Scrolllock