Skip to content

Instantly share code, notes, and snippets.

@tdcosta100
tdcosta100 / WSL2GUIWSLg-Wayland-en.md
Last active April 8, 2025 20:35
Using full desktop shell in WSL2 using WSLg (Wayland)

Full desktop shell in WSL2 using WSLg (Wayland)

Note

If you want a more complete experience and already tried the Xvnc tutorial, maybe you should try the WSLg (Xwayland) instead.

Warning

This is a work in progress tutorial. Things done here may break existing functionality, so be careful!

In this tutorial, we will install and use a full GNOME Desktop environment in WSL2, without any external software. The only requirement is a working WSLg installation. At the moment, the instructions are only for Ubuntu (20.04, 22.04 and 24.04) distros and GNOME, but you can request me to test other distros and desktop environments.

Дисклеймер: проверено на свежем ArchLinux с systemd-networkd. Скрипт достаточно наивен и работа на иных конфигурация может быть под вопросом. Отлаживать через ip rule, ip route show table 10032590.

[опционально] Определите ваш MTU для маршрута к Valve

$ curl https://gist.githubusercontent.com/PtaxLaine/2d4115a3c4004884a36d7f6f07bda666/raw/mtu_probe.sh | bash

Установка

@httpsx
httpsx / WireGuard DPI обход РКН - Windows.md
Last active April 14, 2025 05:43
WireGuard DPI обход РКН - Windows

Для обхода блокировки достаточно отправить 1 любой udp пакет, тем самым нарушим начальное определение протокола WireGuard
Способ с использованием Windows PowerShell. Без скачивания Nmap и подобного софта.

Шаг 0: Отключитесь от всех туннелей.

Шаг 1: Редактируем Клиент конфиг

Добавим в него "ListenPort", это позволит иметь статичный порт на котором будет работать WireGuard
Нажмите ПКМ на нужный "туннель" и выберите "Редактировать выбранный туннель..." Step1

После DNS добавляем новую строку

@pagkly
pagkly / wslkernel.sh
Last active February 25, 2025 13:43
WSL2 - Compile Kernel with Ashmem and Binder
# Waydroid
# WSl custom kernel
# https://gist.github.com/oleksis/eb6d2f1cd2a6946faefb139aa0e38c35
# https://github.com/waydroid/waydroid/issues/217
# https://www.youtube.com/watch?v=SfK4PBcFq0w
# Powershell shutdown & remove config
wsl --shutdown
rm /mnt/c/Users/user/.wslconfig
# install dependencies
@ammuench
ammuench / 8BitDoUltimateWifi_Linux.MD
Last active April 14, 2025 00:17
8BitDo Ultimate 2.4GHz wifi working in linux
@roib20
roib20 / apt-repo-playbook.yaml
Last active April 2, 2025 13:39
Example usages of the new `deb822_repository` Ansible module
---
- hosts: localhost
connection: local
gather_facts: true
tasks:
- name: Add APT repositories
when: ansible_os_family == 'Debian'
become: true
block:
@ngadmini
ngadmini / pve_API2Subs_sed.sh
Last active August 10, 2024 00:42
remove naged subscription message on proxmox 7.x-x
#!/usr/bin/env bash
# TAGS
# /usr/local/bin/pve-API2Subs_sed.sh
# https://gist.github.com/ngadmini/7f9df377999cc78c1b58e361d5425ac4#file-pve_api2subs-sh
# AUTHOR
# [email protected]
# https://github.com/ngadmini
# https://gist.github.com/ngadmini
# VERSION
# v10.5
@the-spyke
the-spyke / pipewire.md
Last active April 9, 2025 20:59
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@CharlesGodwin
CharlesGodwin / How to use ssh-copy-id.md
Last active March 8, 2025 19:37
Windows 10/11 scripts to support ssh-copy-id which is missing in Windows OpenSSH

The Windows version of OpenSSH client doesn't include a ssh-copy-id command. I don't know why. If it does one day, then this can be ignored.

NOTE If you have Windows Subsystem for Linux (WSL) installed, you can use the linux version of ssh-copy-id instead. Go to the description at the end of this document.

  • Download the file ssh-copy-id.cmd to your Windows PC, or copy and paste its contents.
  • Run the script passing your linux ssh information (for example ssh-copy-id.cmd [email protected]). This should work with any Linux platform. Alternatively, if you have experience, you can use the powershell version. ssh-copy-id.ps1. Run the script as powershell .\ssh-copy-id.ps1 [email protected].
  • Run the command for each linux account you connect with. You will be prompted for your Linux host password. If you have more than 1 account on any machine, you must do this for each account.

The file name and location of the script is not important but the filename extension must be .cmd

@nhthai2005
nhthai2005 / Autocomplete_ssh_scp.md
Last active January 7, 2025 10:17
Autocomplete server names for SSH and SCP for Git Bash

Autocomplete server names for SSH and SCP for Git Bash

For ssh

1. Make a file with name ssh as following content:

_ssh() 
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"