Skip to content

Instantly share code, notes, and snippets.

View aspadm's full-sized avatar
:octocat:

Asp Adm (Alexey Kirillov) aspadm

:octocat:
View GitHub Profile
@aspadm
aspadm / flowlayout.py
Last active May 6, 2020 15:13 — forked from Cysu/gist:7461066
Python: PyQt5 FlowLayout
from PyQt5 import QtCore, QtWidgets
class FlowLayout(QtWidgets.QLayout):
def __init__(self, parent=None, margin=0, spacing=-1):
super().__init__(parent)
if parent is not None:
self.setContentsMargins(margin)
self.setSpacing(spacing)
@aspadm
aspadm / find_patch_place.py
Last active January 7, 2021 20:07
Finds location of number in Diggles/Wiggles.exe that sets the number of pixels for mixing ground materials
# For commandline argv
import sys
# For PE parsing
import pefile
# Convert value to 4 bytes
def val_to_b(value):
return value.to_bytes(4, byteorder="little")
## Constants to search