Skip to content

Instantly share code, notes, and snippets.

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

Mahmoud Rusty Abdelkader mahmoudimus

💭
@_@
View GitHub Profile
@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 / 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

@mahmoudimus
mahmoudimus / llvm17_clang17.sh
Last active April 1, 2024 14:12
dockerfile to build tensorflow from source
function install() {
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 17
locate clang-17
clang-17 --version
}
function uninstall() {
sudo rm /etc/apt/sources.list.d/archive_uri-http_apt_llvm_org_*.list
@mahmoudimus
mahmoudimus / .zshrc
Created March 24, 2024 15:43 — forked from matfax/.zshrc
Sudo authentication with Windows 1Password CLI on Ubuntu WSL
# ....
alias sudo="sudo -A"
@mahmoudimus
mahmoudimus / build-emacs.sh
Last active May 10, 2024 08:52 — forked from 3tty0n/build-emacs.sh
Build emacs on Ubuntu 22.04
#!/bin/sh
# Explore:
# https://github.com/howardabrams/hamacs/blob/main/README-Linux.org
# https://batsov.com/articles/2021/12/19/building-emacs-from-source-with-pgtk/
# https://practical.li/blog/build-emacs-from-source-on-debian-linux/
# https://github.com/konstare/emacs-gcc-pgtk/blob/master/Dockerfile
# First determine your gcc version with gcc --version,
# then modify libgccjit-12-dev below to the major version number you have!
@neggles
neggles / cuda-install-wsl2.sh
Last active June 23, 2024 07:59
WSL2 ubuntu 22.04 CUDA setup
#!/usr/bin/env bash
set -euo pipefail
# please don't run this script as an actual script. it's not remotely error checked. paste command blocks in one by one
# and make sure the output looks vaguely sane.
# remove this once you've read below!
echo "You didn't actually read the instructions, did you?"; exit 1
# first up, `sudo nano /etc/wsl.conf` and add this:
[boot]
@mahmoudimus
mahmoudimus / hand-modify-pdf.md
Created September 4, 2023 22:06 — forked from senderle/hand-modify-pdf.md
So you want to modify the text of a PDF by hand

So you want to modify the text of a PDF by hand...

If you, like me, resent every dollar spent on commercial PDF tools, you might want to know how to change the text content of a PDF without having to pay for Adobe Acrobat or another PDF tool. I didn't see an obvious open-source tool that lets you dig into PDF internals, but I did discover a few useful facts about how PDFs are structured that I think may prove useful to others (or myself) in the future. They are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.

#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Script to draw bounding boxes and text from a Tesseract box file.
The script takes an image TIFF_FILE, draws the text and bounding boxes
of the corresponding BOX_FILE and saves the resulting OUT_FILE.
Tesseract box file columns:
<symbol> <left> <bottom> <right> <top> <page>
@mahmoudimus
mahmoudimus / README.md
Last active May 10, 2023 13:22
Patch to upgrade Kaliel's Tracker to 10.1