Skip to content

Instantly share code, notes, and snippets.

View kubinka0505's full-sized avatar
👽
I may be slow to respond.

kubinka0505 kubinka0505

👽
I may be slow to respond.
View GitHub Profile
@kubinka0505
kubinka0505 / SetFolderIcon.py
Created May 18, 2023 17:08
Set folder's icon on Windows from any DLL resource.
"""SetFolderIcon
Set folder's icon on Windows from any DLL resource."""
import ctypes
from os.path import *
from ctypes.wintypes import BYTE, WORD, DWORD, LPWSTR
from ctypes import POINTER, Structure, c_wchar, c_int, sizeof, byref
__author__ = ["Christoph Gohlke", "kubinka0505"]
__credits__ = __author__
@kubinka0505
kubinka0505 / Registry_Setter.pyw
Created May 12, 2023 15:52
Script that allows batch values setting into the Windows Registry editor with administrator privileges.
__doc__ = """Registry Setter
Script that allows batch values setting into the
Windows Registry editor with administrator privileges.
Can be used as standalone `Registry_Set` function
(with modules) or as an ArgumentParser one.
---
@kubinka0505
kubinka0505 / Gothic_Saves_Backup.py
Created June 29, 2022 08:52
Automatic script for Gothic saves backup.
"""Gothic Saves Backup
Automatic script for Gothic saves backup."""
from os import *
from tkinter import *
from zipfile import *
from pathlib import Path
from shutil import rmtree
from tkinter import filedialog as fd
from distutils.dir_util import copy_tree
@kubinka0505
kubinka0505 / Inkscape_HTML_Nodes_Delimiter.py
Created August 2, 2021 20:14
Script delimiting Inkscape's HTML node points. Can be used as both CLI and GUI.
"""Script delimiting Inkscape's HTML node points
Can be used as both CLI and GUI.
Google Colab Version:
- https://colab.research.google.com/gist/kubinka0505/42723812ac6d4ed0b1f80e7a49481f70"""
from sys import *; del path
from os import *; del open
from subprocess import call
from tkinter import Tk, messagebox as msgbox, filedialog as fd
chdir(path.abspath(path.dirname(__file__)))
@kubinka0505
kubinka0505 / Inkscape_HTML_Nodes_Delimiter.ipynb
Last active August 2, 2021 20:25
Inkscape HTML Nodes Delimiter (Google Colab)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kubinka0505
kubinka0505 / Discord Custom Emoji Ripper.py
Created January 18, 2021 11:51
Discord Custom Emoji Ripper (rewrite)
import discord # >= 1.6
from os import *
from io import BytesIO
from discord.ext.commands import Bot
__description__ = "Discord Custom Emoji Ripper"
__author__ = "kubinka0505"
__date__ = "18.01.2021"
__version__ = "0.1"
__credits__ = __author__
@kubinka0505
kubinka0505 / outdated.py
Last active February 26, 2024 20:32
[does not work, don't use] Simple script providing multiline text draw with emoji support (Pillow & emojicdn)
"""Simple script providing multiline text draw with emoji support (Pillow & emojicdn)"""
import io
from requests import get
from textwrap import wrap
from urllib.parse import quote_plus
from emoji import emojize, demojize, UNICODE_EMOJI
from PIL import Image, ImageDraw, ImageFont, UnidentifiedImageError
#-----#
from PIL import Image
from requests import get
BG = Image.new("RGBA", (325, 250), (255,) * 3)
FG = get("https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Circle_-_black_simple.svg/100px-Circle_-_black_simple.svg.png", stream = True).raw
FG = Image.open(FG).convert("RGBA")
class Paste_Image(object):
def __init__(self, Background: Image, Foreground: Image, Crop = True):
self.FG = Foreground.crop(Foreground.getbbox()) if Crop == True else Foreground