Skip to content

Instantly share code, notes, and snippets.

View meganukebmp's full-sized avatar

Nexrem meganukebmp

View GitHub Profile
@meganukebmp
meganukebmp / Make (MINGW).sublime-build
Created January 23, 2022 21:03
A Sublime Text build system integrating MINGW on Windows
{
"shell_cmd": "C:\\msys64\\usr\\bin\\env MSYSTEM=MINGW64 c:\\msys64\\usr\\bin\\bash -l -c \"cd \\$(cygpath -u '${folder:${project_path:${file_path}}}') && make\"",
"file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${folder:${project_path:${file_path}}}",
"selector": "source.makefile",
"syntax": "Packages/Makefile/Make Output.sublime-syntax",
"keyfiles": ["Makefile", "makefile"],
"variants":
[
@meganukebmp
meganukebmp / los_gerrit_push.txt
Last active July 14, 2022 00:04 — forked from adithya2306/los_gerrit_push.txt
Push commit(s) in a repo to LOS Gerrit even if you're not in LOS env
# Push commits to LOS Gerrit
git push ssh://<gerrit-user-id>@review.lineageos.org:29418/LineageOS/<repo-name> HEAD:refs/for/<branch>
# Install change-id hooks first:
gitdir=$(git rev-parse --git-dir); scp -O -p -P 29418 <gerrit-user-id>@review.lineageos.org:hooks/commit-msg ${gitdir}/hooks/
@meganukebmp
meganukebmp / extract_bmp.py
Created November 21, 2022 19:47
Dump raw images from binaries (with headers)
from pathlib import Path
import io
import sys
data = Path(sys.argv[1]).read_bytes()
l = len(data)
for index, b in enumerate(data):
if (b == 0x42 and data[index+1] == 0x4D):
x = int.from_bytes(data[index+2:index+6], byteorder="little", signed=False)