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.
View SetFolderIcon.py
"""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.
View Registry_Setter.pyw
__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.
View Gothic_Saves_Backup.py
"""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.
View Inkscape_HTML_Nodes_Delimiter.py
"""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)
View Inkscape_HTML_Nodes_Delimiter.ipynb
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)
View Discord Custom Emoji Ripper.py
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 / Simple script providing multiline text draw with emoji support (Pillow & emojicdn).py
Last active August 17, 2021 13:52
Simple script providing multiline text draw with emoji support (Pillow & emojicdn)
View Simple script providing multiline text draw with emoji support (Pillow & emojicdn).py
"""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
#-----#
View Python image grid pasting.py
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