Skip to content

Instantly share code, notes, and snippets.

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

Mahmoud Rusty Abdelkader mahmoudimus

💭
@_@
View GitHub Profile
@mahmoudimus
mahmoudimus / idea-gcg1.vmoptions
Last active May 16, 2024 14:52
A running timeline of my IntelliJ on Steroids with GC tuning
-ea
-server
-Xss256k
-Xms4G
-Xmx4G
-XX:+IgnoreUnrecognizedVMOptions
-XX:+UnlockExperimentalVMOptions
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:-UseSerialGC
@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!
@mahmoudimus
mahmoudimus / fyrak.md
Created May 9, 2024 00:01 — forked from myran2/fyrak.md
Mythic Fyrak macro guide - MD

Mythic Fyrak Macro/WA Setup & Troubleshooting

The Macro - You probably already have this from Smolderon prog

Liquid

/run WeakAuras.ScanEvents("LIQUID_PRIVATE_AURA_MACRO", true)

NS

/run WeakAuras.ScanEvents("NS_PA_MACRO", true)

Bonus stuff

  • Some people like including a Squeaky Bat use in their macro, so that you can see in logs when people pressed the macro.
    • The bats cost like 5-10k on the AH and are NOT consumed on use, so everyone in your raid only needs one.
  • This way, any casts of Squeaky Bat (179295) in logs would indicate a macro press.
@mahmoudimus
mahmoudimus / bin_db.sql
Created June 30, 2020 02:42
credit card bin database
-- --------------------------------------------------------
--
-- Table structure for table `creditcard_category`
--
CREATE TABLE IF NOT EXISTS `creditcard_category` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
@mahmoudimus
mahmoudimus / text_nontext_separation.py
Last active April 7, 2024 04:00
A stupidly simple approach for text non-text separation for printed document images.
import argparse
import os
import torch
import pandas as pd
from PIL import Image
def LTPN_rotation_cal(mat, th):
"""
@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

TensorRT + Ubuntu 22.04 (on WSL2)

I revolced the following warnings related to libnvinfer.so.7 and libnvinfer_plugin.so.7

W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: xxxxx
W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: xxxxx
W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
@mahmoudimus
mahmoudimus / cuda-install-wsl2.sh
Created April 1, 2024 00:30 — forked from neggles/cuda-install-wsl2.sh
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]
from matplotlib import pyplot as plt
import cv2
img = cv2.imread('/Users/mustafa/test.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
plt.imshow(gray)
plt.title('my picture')
plt.show()
@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"