Skip to content

Instantly share code, notes, and snippets.

View BlackCatDevel0per's full-sized avatar

Asadbek Sayfiyev BlackCatDevel0per

View GitHub Profile
@mmozeiko
mmozeiko / !README.md
Last active April 26, 2025 16:59
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for native desktop app development.

Run py.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK - currently v14.40.33807 and v10.0.26100.0.

You can list available versions with py.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe first run setup_TARGET.bat - after that PATH/INCLUDE/LIB env variables will be updated to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@joezuntz
joezuntz / run_in_subprocess.py
Last active October 14, 2023 13:36
Python decorator to let you run a function that may kill/hang in a subprocess, isolating it.
import multiprocessing as mp
import os
import functools
from queue import Empty
class TimeoutError(Exception):
pass
def optionally_run_in_subprocess(f):
"""A decorator adding a kwarg to a function that makes it run in a subprocess.
@aron-bordin
aron-bordin / kivyconsole.py
Last active March 28, 2024 15:31
Initial Python/Kivy Terminal Emulator (It's just a performance test. You can use this sample to write your own terminal emulator)
from kivy.base import runTouchApp
from kivy.event import EventDispatcher
from kivy.lang import Builder
from kivy.properties import ObjectProperty, ListProperty, StringProperty, \
NumericProperty, Clock, partial
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.textinput import TextInput
import os
import subprocess
import threading