Skip to content

Instantly share code, notes, and snippets.

View c0ns0le's full-sized avatar
:octocat:
I may be slow to respond.

c0ns0le c0ns0le

:octocat:
I may be slow to respond.
View GitHub Profile
@Ruffo324
Ruffo324 / Hyper-V PCI-Passthroug.ps1
Last active March 30, 2025 16:34
Hyper-V PCIe passthrough CheatSheet
# Change to name of TARGET-VM.
$vm='CHANGE_ME'
# Change to PCI device location (💡 Location).
$Location = 'CHANGE_ME'
# Enable CPU features.
Set-VM -GuestControlledCacheTypes $true -VMName $vm
# Host-Shutdown rule must be changed for the VM.
Set-VM -Name $vm -AutomaticStopAction TurnOff
@milnak
milnak / ubuntu20-hyperv-enhanced-session.md
Last active November 22, 2024 17:28
Enabling enhanced session in Hyper-V for Ubuntu 20: This works for me, although it seems that Hyper-V quick create now supports enhanced session by default. #ubuntu #hyperv

Setup Hyper-V enhanced session for Ubuntu 20

I couldn't find instructions that were 100% complete, so I put this together.

These instructions worked fine for me. Follow each step carefully.

Download Ubuntu 20 desktop

DO NOT create the VM by choosing Quick Create in Hyper-V Manager. Follow these instructions exactly.

@theerebuss
theerebuss / setup_git.sh
Last active March 12, 2024 16:50
Setup GitHub's SSH and GPG keys for WSL and ZSH environments
#!/bin/bash
# For WSL environments only
npm install --global yarn
password=""
echo "Please provide your Git commit info"
read -p "Full name: " fullName
read -p "Email: " email
@asizikov
asizikov / .wslconfig
Created February 3, 2021 09:58
Configure global WSL options.
#C:\Users\<yourUserName>\.wslconfig
# https://blog.cloud-eng.nl/2021/02/03/wsl2-limits-vmmem/
[wsl2]
memory=6GB # How much memory to assign to the WSL 2 VM.
processors=4 # How many processors to assign to the WSL 2 VM.
swap=1GB # How much swap space to add to the WSL 2 VM, 0 for no swap file.
localhostForwarding=true # ports bound to wildcard or localhost in the WSL 2 VM should be connectable from the host via localhost:port.
@phamquocbuu
phamquocbuu / .wslconfig
Created January 12, 2021 02:51
Create a %UserProfile%\.wslconfig file and use it to limit memory assigned to WSL2 VM. WSL does use a really low amount of RAM but it is allocated about 4GB by default when it is started. If you think that’s too much and would like to decrease it, Windows Insider Build 18945 brough customizable settings for wsl. https://blog.simonpeterdebbarma.c…
[wsl2]
kernel=<path> # An absolute Windows path to a custom Linux kernel.
memory=<size> # How much memory to assign to the WSL2 VM.
processors=<number> # How many processors to assign to the WSL2 VM.
swap=<size> # How much swap space to add to the WSL2 VM. 0 for no swap file.
swapFile=<path> # An absolute Windows path to the swap vhd.
localhostForwarding=<bool> # Boolean specifying if ports bound to wildcard or localhost in the WSL2 VM should be connectable from the host via localhost:port (default true).
# <path> entries must be absolute Windows paths with escaped backslashes, for example C:\\Users\\Ben\\kernel
# <size> entries must be size followed by unit, for example 8GB or 512MB
@dominicusin
dominicusin / NOPASSWD
Last active September 3, 2023 00:58
NOPASSWD
mkdir -pv /etc/sudoers.d/
echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/dont-prompt-$USER-for-sudo-password
mkdir -pv /usr/local/etc/sudoers.d/
echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" |sudo tee /usr/local/etc/sudoers.d/dont-prompt-$USER-for-sudo-password
@Sebazzz
Sebazzz / ACrealityCR6Issue.md
Last active January 8, 2025 23:11
Creality CR-6 issue list (including listing of motherboard issues)

Creality CR-6 issue list

This is an initiative to create an overview of the issues found with the Creality CR-6 SE.

As of this writing (2020-09-19) the large number of the motherboard issues have not been publicly acknowledged. Hopefully this overview forces Creality to acknowledge the issues with the Creality CR-6 SE leveling free 3d printer.

Update 2021-07-17 from Creality

According to Creality all issues should be resolved in the newer models:

Here are the improvements we did as below:

@sivinnguyen
sivinnguyen / wsl2_200915_fix_dns_resolution.md
Last active April 12, 2024 07:30
Fix DNS resolution in WSL2

Error

$ sudo apt-get update
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
Temporary failure in name rerolution

$ host google.com
;; connection timed out; no servers could be reached
@mslinn
mslinn / Upgrade to Ubuntu 20.04 Focal on WSL (aka WSL1) and WSL2 instructions.md
Last active April 29, 2021 21:05
Upgrade to Ubuntu 20.04 Focal on WSL1 and WSL2
  1. Display whether you have WSL1 or WSL2 by typing wsl --list --verbose into a PowerShell prompt, like this:
    PS C:\Users\mslin> wsl --list --verbose
      NAME      STATE           VERSION
    * Ubuntu    Running         1
    
    The above shows that a machine has WSL1 installed.
  2. Ignore this step if you have WSL2.

    The default Ubuntu sleep command does not work on WSL1. sleep must work properly in order for the upgrade to succeed.
@rfaita
rfaita / wsl2.md
Last active October 1, 2023 04:03
Installing WSL2 on Windows 10

Install and configure WSL2 on windows 10

Install WSL2

Using the following link here install the WSL 2 on your windows 10.

Install X-Server

VcXsrv seems to the best choice for X-Server in Windows