Skip to content

Instantly share code, notes, and snippets.

View divadsn's full-sized avatar
🎯
Focusing

David Sn divadsn

🎯
Focusing
  • Krakow, Poland
  • 17:52 (UTC +02:00)
View GitHub Profile
@divadsn
divadsn / override-dll.reg
Created August 20, 2019 15:12
mfc42 manual installation, taken from PlayOnLinux scripts.
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\DllOverrides]
"*mfc42"="native"
"*mfc42u"="native"
@divadsn
divadsn / runscript.sh
Created September 19, 2019 23:53
Script to run GTA IV with older Wine version. Usage: runscript.sh LaunchGTAIV.exe
#!/bin/bash
export WINEPREFIX=~/.local/share/wineprefixes/GTAIV
export WINEARCH=win32
winepath=$(readlink -f ~/.local/share/wine/4.11_win32)
if [ ! -d $winepath ]; then
echo "Could not find wine-4.11 installation at $winepath, quitting..."
exit 1
fi
@divadsn
divadsn / lumberkek.py
Created October 8, 2019 22:32
Basically I had too much time again with Python...
import time
from mss import mss
from PIL import Image
from pynput.keyboard import Key, Controller
keyboard = Controller()
sct = mss()
# check for any "brown" pixel
def check_tree(pixels, x, y):
@divadsn
divadsn / fuckmagisk.json
Last active March 29, 2020 10:49
Use this as custom version for Magisk Manager to prevent notification spam for the new ugly version.
{
"app": {
"version": "7.5.1",
"versionCode": "267",
"link": "https://github.com/topjohnwu/Magisk/releases/download/manager-v7.5.1/MagiskManager-v7.5.1.apk",
"note": "https://raw.githubusercontent.com/topjohnwu/Magisk/7db523071d662dcc8eb187e3cbae141c716ba045/app/src/main/res/raw/changelog.md"
},
"uninstaller": {
"link": "https://github.com/topjohnwu/Magisk/releases/download/v20.4/Magisk-uninstaller-20200323.zip"
},
@divadsn
divadsn / extractor.py
Last active April 4, 2020 14:29
Proof of concept extractor script for cda.pl video links, reverse engineered from updated player.js
import json
import urllib.request
from urllib.parse import unquote
from bs4 import BeautifulSoup
def decrypt(a: str):
a = unquote(a.replace("_XDDD", ""))
b = []
@divadsn
divadsn / clearlogs.py
Last active November 6, 2020 17:31
Shitty python script to delete old VM logs
#!/usr/bin/env python3
import os
import argparse
rootdir = "/var/log/pve/tasks"
logfiles = {
"active": [],
"index": []
}
@divadsn
divadsn / domki.py
Created May 11, 2020 11:39
Przykładowy skrypt pobierający dane domków z Mapy Play Your Life i sprawdzający które wygasają kolejnego dnia.
#!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = "xDivadz (David Sn)"
__license__ = "GPLv3"
# standardowe biblioteki Python
import urllib.request
import datetime
import json
@divadsn
divadsn / mta_install.sh
Last active May 1, 2021 01:36
All-in-one installation script for Multi Theft Auto on Linux. Requires wine with lib32 supported libraries.
#!/bin/bash
export WINEPREFIX=/home/$USER/.local/share/MultiTheftAuto
export WINEARCH=win32
wineboot -u
hexdump -n 4 -e '4/4 "%08X" 1 "\n"' /dev/urandom > $WINEPREFIX/drive_c/.windows-serial
winetricks -q d3dx9
@divadsn
divadsn / gtts.py
Created August 14, 2020 15:29
Why even use the entire SDK lul...
import base64
import json
import requests
class TTSException(Exception):
def __init__(self, code: int, message: str, status: str):
self.code = code
self.message = message
import nbt
import os
import requests
import shutil
import uuid
uuids = {}
for file in os.listdir("world/playerdata"):
if file.endswith(".dat"):