Skip to content

Instantly share code, notes, and snippets.

@Nislaco
Nislaco / build.sh
Last active August 7, 2025 07:10
Working build script for WSL kernel module for 6.12.9+bpo-amd64
#!/bin/bash -e
BRANCH=linux-msft-wsl-6.6.y
if [ "$EUID" -ne 0 ]; then
echo "Swithing to root..."
exec sudo $0 "$@"
fi
apt-get install -y git dkms curl dwarves linux-source-6.12
@bennyistanto
bennyistanto / Install_CUDA_and_cuDNN_using_conda.md
Last active September 8, 2025 08:29
Install CUDA and cuDNN using Conda

Install CUDA and cuDNN using Conda

Tested on:

Windows 11 Pro for Workstations and WSL2 Debian 12
Processor: Intel(R) Xeon(R) Gold 6138 CPU @ 2.00GHz 2.00 GHz (2 processors)
Installed RAM: 384 GB
VGA: NVIDIA Quadro P2000 5GB


@ThioJoe
ThioJoe / Allocate-GPUs-VM.ps1
Last active August 8, 2025 15:31
PowerShell script to allocate and pass through GPU to Hyper-V Virtual Machine
# Script to easily set resource allocation for GPUs to be passed through into a Hyper-V VM
#
# Author: ThioJoe / https://github.com/thiojoe
#
### Instructions for copying drivers to VM - Will likely need to do this before running this script
# NOTE: Instead of manually copying the files, if you have an Nvidia GPU you can use my other script called "Copy-GPU-Drivers-VM.ps1" to do it automatically
# 1. Open C:\Windows\System32 on host machine and copy any files beginning with "nv" (Except nvspinfo.exe and NvAgent.dll , which are unrelated)
# 2. Place those files into the System32 folder on the VM
# 3. On the VM, create the following directory: C:\Windows\System32\HostDriverStore\FileRepository
# 4. For Nvidia GPUs, open C:\Windows\System32\DriverStore\FileRepository, copy any folders beginning with "nv_" (The number of folders should match the number of GPUs, or at least number of different models of GPU)
@lmammino
lmammino / promise-with-resolvers-polyfill.js
Created July 18, 2023 17:57
Promise.withResolvers() polyfill
if (typeof Promise.withResolvers === 'undefined') {
Promise.withResolvers = function () {
let resolve, reject
const promise = new Promise((res, rej) => {
resolve = res
reject = rej
})
return { promise, resolve, reject }
}
}
@sinwoobang
sinwoobang / curl-h3.sh
Last active August 17, 2025 19:00
Install curl supporting HTTP/3 on Apple Silicon
# Referred to https://dev.to/gjrdiesel/installing-curl-with-http3-on-macos-2di2
# Clean up any old version of curl you may have already tried to install
brew remove -f curl
# Download the curl ruby install script provided by cloudflare
curl -O https://gist.githubusercontent.com/sinwoobang/bfc7cc8d4d38157bde064fc2ccb60c64/raw/bf55b7c6af9ed06d2cd909ea167a69948a800e7d/curl.rb
# Install curl via that script from the latest git repos
brew install --HEAD -s curl.rb
@peytondmurray
peytondmurray / firefox_tweaks.md
Last active August 11, 2024 08:55
Firefox tweaks

Disable microphone and camera mini popup window

Set the following variables in about:config

privacy.webrtc.hideGlobalIndicator = true
privacy.webrtc.legacyGlobalIndicator = false

Remove horizontal tabs at the top of Firefox

@ikrishagarwal
ikrishagarwal / setup-zsh-in-codespaces.md
Last active September 5, 2025 07:01
Setup starship, zsh suggestions and syntax highlight for your codespaces.
@enihsyou
enihsyou / 获取移动光猫H2-2管理员密码.md
Last active July 18, 2025 14:39
获取移动光猫 H2-2 管理员密码 ver.2022-04

长话短说,直接列出操作方法。求解过程用到的阅读链接放在最后

适用型号

设备名称:吉比特无源光纤接入用户端设备(GPON ONU)
设备类型:中国移动智能家庭网关 类型二
设备型号:H2-2
生产日期:2021/03

[!IMPORTANT]

@sxzz
sxzz / hi.md
Last active June 27, 2025 14:10
自我介绍

自我介绍

👋 Hi,我是三咲智子,00 后,目前大二在读(写于 2022 年),开源爱好者,Vue、VueUse、Element Plus 开源社区团队成员。这篇文章受 Anthony Fu 的播客视频的启发,主要介绍我的编程经历。以时间线为顺序,也是自我回忆和整理下我这些年都干了些什么。部分回忆可能存在时间错误,但事情都是实际发生过的。

我的经历

我从小学就开始接触编程和其他技术相关的东西了。

2011 年 9 岁四年级

@OlfillasOdikno
OlfillasOdikno / Linux_GPU_PV.md
Last active August 7, 2025 18:27
Hyperv Linux Guest GPU PV

Hyperv Linux Guest GPU PV

  • Create VM
$isopath = <iso location>
$vhdpath = <vhdx location>
$vmpath = <vm path>
$vmname = "Arch-dxgkrnl"
New-VM -Name $vmname -MemoryStartupBytes 8GB -BootDevice VHD -NewVHDPath $vhdpath -Path $vmpath -NewVHDSizeBytes 20GB -Generation 2 -Switch "Default Switch"