Skip to content

Instantly share code, notes, and snippets.

@66Ton99
66Ton99 / void-wsl.sh
Last active April 3, 2024 16:31 — forked from JucaRei/void-wsl.sh
Install Void Linux on WSL2
# Based on https://gist.github.com/kmatt/71603170556ef8ffd14984af77ff10c5
# prompt ">" indicates Powershell commands
# prompt "$" are Linux shell commands
# https://learn.microsoft.com/en-us/windows/wsl/install
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# No need for Windows 11, but for Windows 10 install https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
@ryuheechul
ryuheechul / build-accelerated-kvm-guest-custom-kernel-for-wsl2.md
Last active March 12, 2024 23:53
Build An Accelerated KVM Guest Custom Kernel for WSL 2

I'm not the author the blog post and this gist is a simply a note on my usage based on the original post, https://boxofcables.dev/kvm-optimized-custom-kernel-wsl2-2022/.

I also changed the code that extract the latest to a concrete linux kernel version.

First start with openSUSE Tumbleweed distro and commands below can be used to build the custom kernel and set it to be used for WSL2 distros.

# prepare build deps
sudo zypper -n up
# original from the post
@mmozeiko
mmozeiko / !README.md
Last active April 19, 2024 07:40
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone 64-bit 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 64-bit native desktop app development.

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

You can list available versions with python.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 from output folder, first run setup.bat - after that PATH/INCLUDE/LIB env variables will be setup 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).

@kmatt
kmatt / void-wsl.txt
Last active April 3, 2024 16:30
Install Void Linux on WSL2
# Based on https://gist.github.com/kmatt/71603170556ef8ffd14984af77ff10c5
# prompt ">" indicates Powershell commands
# prompt "$" are Linux shell commands
# https://docs.microsoft.com/en-us/windows/wsl/install-win10
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# install https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
@sukesh-ak
sukesh-ak / README.md
Last active October 26, 2023 10:15
How to Convert OVA to VHDX

How to convert OVA to VHDX

  • Rename .OVA file to .7z
  • Use winrar to extract .vmdk out of it

Read here and install qemu (extract zip file)

https://cloudbase.it/qemu-img-windows/

qemu-img convert "D:\VirtualBox\Open-disk001.vmdk" -O vhdx -o subformat=dynamic "D:\VirtualBox\Open.vhdx"

@ryuheechul
ryuheechul / windows.md
Last active March 13, 2024 02:23
Let that Windows 10/11 be a bit friendlier

An attempt to make Windows 10/11 work for me by customizing/personalizing it

Why gist not dotfiles?

I use dotfiles to personalize *nix type of machines. But I'm new to personalizing Windows 10. So I'm collecting information here first before adding these to the dotfiles. I'm not sure if these will ever move to dotfiles though.

Enable WSL2

@jivanpal
jivanpal / kill-adobe-daemons.sh
Last active August 6, 2023 17:23
Stop Adobe Creative Cloud daemons (background processes) in their tracks
#!/bin/bash
if [ "$1" = "-s" ] || [ "$1" = "--show" ]; then
show=true
else
show=false
fi
if $show || [ "$1" = "-v" ] || [ "$1" = "--verbose" ]; then
verbose=true
@unshifty
unshifty / jurik.py
Created July 23, 2020 12:41
Pinescript jurik ma
jmapower = input(title="JMA Power", type=input.integer, defval=2)
jmaphase = input(title="Phase", type=input.integer, defval=50)
jma(src, length, phase, power) =>
phaseRatio = phase < -100 ? 0.5 : phase > 100 ? 2.5 : phase / 100 + 1.5
beta = 0.45 * (length - 1) / (0.45 * (length - 1) + 2)
alpha = pow(beta, power)
jma = 0.0
e0 = 0.0
e0 := (1 - alpha) * src + alpha * nz(e0[1])
e1 = 0.0
@yogthos
yogthos / clojure-beginner.md
Last active April 22, 2024 09:00
Clojure beginner resources

Introductory resources

@tchiavegatti
tchiavegatti / check_version.py
Last active November 15, 2021 20:57
[Check python version on a Jupyter notebook] #jupyter
# Check version runing on Jupyter notebook
from platform import python_version
print(python_version())
# Check version inside your Python program
import sys
print(sys.version)
# Check version in command line or shell
python --version