Skip to content

Instantly share code, notes, and snippets.

@chenxuan520
chenxuan520 / pastebin-worker.js
Last active July 27, 2025 17:19
cloudflare-pastebin
// HTML模板,定义了页面的结构和样式
const HTML_TEMPLATE = `
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
@tdcosta100
tdcosta100 / WSL2GUIWSLg-XWayland-en.md
Last active December 9, 2025 08:30
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

#!/usr/bin/env bash
# Original sequences to search for.
ORIGINAL_SEQUENCES=('0a2450292801080a087d0a1b28010035' '48010035822240b980420491e10313aa')
# Patch sequences to replace the original sequences with.
PATCH_SEQUENCES=('0a2450292801080a087d0a1b1f2003d5' '1f2003d5822240b980420491e10313aa')
function log() {
local colors=( "\e[34m" "\033[1;33m" "\033[1;31m" "\033[1;32m" )
@FreddieOliveira
FreddieOliveira / docker.md
Last active December 10, 2025 00:41
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active December 10, 2025 12:26 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@