Skip to content

Instantly share code, notes, and snippets.

View bryan-hoang's full-sized avatar
🎯
Focusing

Bryan Hoang bryan-hoang

🎯
Focusing
View GitHub Profile
@4tkbytes
4tkbytes / howto.md
Last active October 16, 2025 23:15
Installing Rust on windows desktops without admin

Installing rust on desktops without admin

Are you on a computer where you cannot get MSVC on a computer because of admin? Well, this guide should help you out!

Note

This guide is only for windows.

  1. Download rustup/rust-init for windows. Download from here: https://www.rust-lang.org/tools/install or download from the web. Don't install it yet
  2. Download msys2. You will not be using MSVC, but instead be compiling using GNU. It does not make any differences (afaik) compared to MSVC. Download it from here: https://www.msys2.org/ and run through the setup. Msys2 should not require admin as it is copying folders. In the case that it does require it,
@KroniK907
KroniK907 / GitButler-WSL.md
Last active September 12, 2025 00:22
Installing GitButler on Windows via WSL

Installing GitButler on WSL Ubuntu - A Complete Guide

Last updated: 2025-09-11 Installing Gitbutler Version: 0.16.0

This guide will provide a complete walkthrough for getting GitButler setup and functioning on a windows environment using Windows Subsystem for Linux (WSL).

Please note that GitButler on windows via wsl is not well tested and not officially supported. Also, please note that installing and running GitButler on windows and pointing it to a WSL project folder or visa versa is not currently supported.

Prerequisites:

@fs-eire
fs-eire / how-to-build-onnxruntime-web-webgpu.md
Last active May 30, 2025 05:04
How to build and consume WebGPU ( 2024-08-22 )

How to build

Prerequisites

Build using the build_jsep.bat

Use the file js\build_jsep.bat. see its content for usage instruction

C:\code\onnxruntime>js\build_jsep d

If it's the first time to build, perform a clean build

@mmozeiko
mmozeiko / !README.md
Last active October 21, 2025 06:36
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).

@alcatrazEscapee
alcatrazEscapee / BiMapRaceCondition.java
Created November 13, 2021 03:05
Race condition involving `BiMap.put` and `BiMap.get`, where `get` returns `null` despite no null ever being present in the map.
package bi_map_race_condition;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
public class BiMapRaceCondition
{
/*
* This code is licensed under CC0 1.0. Use it, do whatever you want with it!
*/
import java.util.List;
import java.util.function.Predicate;
public class PerfectMatchingWithEdmondsMatrix
{
/**
@sindresorhus
sindresorhus / esm-package.md
Last active October 21, 2025 13:33
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@bryan-hoang
bryan-hoang / settings.json
Last active November 26, 2020 18:09
Microsoft Terminal Settings
// This file was initially generated by Windows Terminal 1.4.3243.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"alwaysShowTabs": true,
"theme": "system",
  • SC1000 $ is not used specially and should therefore be escaped.
  • SC1001 This \o will be a regular 'o' in this context.
  • SC1003 Want to escape a single quote? echo 'This is how it'\''s done'.
  • SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
  • SC1007 Remove space after = if trying to assign a value (or for empty string, use var='' ... ).
  • SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
  • SC1009 The mentioned parser error was in ...
  • SC1010 Use semicolo

mysql2 gem + mariadb + Alpine Linux

tl;dr Use mariadb-dev. In case of Alpine Linux 3.8, 3.9, use mysql2 >= 0.4.10.

Starting with Alpine Linux 3.8 there are basically 2 options to install the mysql2 gem:

1.sh: