Skip to content

Instantly share code, notes, and snippets.

@mmozeiko
mmozeiko / !README.md
Last active October 9, 2024 15:04
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).

@jhochwald
jhochwald / ConvertFrom-SafeLinksURL.ps1
Created November 10, 2020 14:50
Decode a Office 365 Advanced Threat Protection SafeLinks URL
function ConvertFrom-SafeLinksURL
{
<#
.SYNOPSIS
Decode a ATP SafeLinks URL
.DESCRIPTION
Decode a Office 365 Advanced Threat Protection SafeLinks URL
.PARAMETER SafeLinksURL
@mrhvid
mrhvid / MultiThred.ps1
Created August 21, 2015 16:27
Original code. I haven't been able to find creater from 2012 or earlier
function Multi-Thred {
Param($ScriptFile = $(Read-Host "Enter the script file"),
$ComputerList = $(Read-Host "Enter the Location of the computerlist"),
$MaxThreads = 20,
$SleepTimer = 500,
$MaxWaitAtEnd = 600,
$OutputType = "Return")
$Computers = Get-Content $ComputerList
@drhelius
drhelius / Game Boy Boot ROM Disassembly
Last active June 25, 2024 00:26
Game Boy Boot ROM Disassembly
LD SP,$fffe ; $0000 Setup Stack
XOR A ; $0003 Zero the memory from $8000-$9FFF (VRAM)
LD HL,$9fff ; $0004
Addr_0007:
LD (HL-),A ; $0007
BIT 7,H ; $0008
JR NZ, Addr_0007 ; $000a
LD HL,$ff26 ; $000c Setup Audio