Skip to content

Instantly share code, notes, and snippets.

View ShawSumma's full-sized avatar
🌿
happy to share this earth with possums!

Shaw ShawSumma

🌿
happy to share this earth with possums!
View GitHub Profile
<body onload="d=m=document;n=Math.random;c=z.getContext`2d`;f=g=>c.fillStyle=g;r=(...y)=>c.fillRect(...y);L=_=>{clearInterval(m);v=i=X=m=s=0;h=71;P=[1,2,3].map(k=>({x:X+=150,y:n()*86}))};L();R=_=>{f`gold`;r(0,0,X,X);f`red`;for({x,y} of P){r(x,0,16,y);r(x,y+48,16,102-y)}r(0,h,8,8);c.fillText(s,0,8)};R();d.onclick=_=>{v=-5;m=m||setInterval('h=h*(h>0);h>=142&&L();h+=v+=0.5;for(p of P){p.x-=2;if(p.x<-31){p.x+=450;p.y=n(s++)*86}p.x<8&&(h<p.y||h>p.y+48)&&L()}R()',35)}"><canvas id=z>
@mmozeiko
mmozeiko / !README.md
Last active April 29, 2025 22:17
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).

@ALANVF
ALANVF / text-editor.red
Last active June 17, 2022 03:15
Text editor demo
Red [
Title: "Text editor"
Author: "ALANVF"
Date: 16-Jun-2022
File: %text-editor.red
Needs: 'View
Purpose: {
Basic text editor
}
]
////////////////////////////////
// NBHS - Non-blocking hashset
////////////////////////////////
// You wanna intern lots of things on lots of cores? this is for you. It's
// inspired by Cliff's non-blocking hashmap.
//
// To use it, you'll need to define NBHS_FN and then include the header:
//
// #define NBHS_FN(n) XXX_hs_ ## n
// #include <nbhs.h>
@u130b8
u130b8 / build.cmd
Created May 14, 2024 19:53
Build Wireshark plugins on Windows without CMake and Qt
@echo off
setlocal EnableDelayedExpansion
set DIR_ROOT=%~dp0.
set DIR_SRC=%DIR_ROOT%\src
set DIR_BUILD=%DIR_ROOT%\build
set DIR_WIRESHARK=%DIR_BUILD%\wireshark
set DIR_WINFLEXBISON=%DIR_BUILD%\winflexbison
set DIR_WIRESHARK_X64_LIBS=%DIR_BUILD%\wireshark-x64-libs
set DIR_WSBUILD64=%DIR_BUILD%\wsbuild64