Unofficial workaround to restore / enable "Open with Code" in Windows 11 Explorer context menu for VSCode.
Reference:
Disclaimer: This is an unofficial method. It is not supported by Microsoft or VSCode maintainers. Use at your own risk.
Unofficial workaround to restore / enable "Open with Code" in Windows 11 Explorer context menu for VSCode.
Reference:
Disclaimer: This is an unofficial method. It is not supported by Microsoft or VSCode maintainers. Use at your own risk.
| FROM debian:13 | |
| COPY <<EOF /etc/apt/sources.list.d/debian.sources | |
| Types: deb | |
| URIs: http://mirrors.tuna.tsinghua.edu.cn/debian | |
| Suites: trixie trixie-updates trixie-backports | |
| Components: main contrib non-free non-free-firmware | |
| Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg | |
| # Types: deb-src |
| """Update uv to its latest version.""" | |
| # ruff: noqa: D101, D102, D103 | |
| from __future__ import annotations | |
| import os | |
| import socket | |
| import subprocess | |
| import sys |
| import unreal | |
| import os | |
| import random | |
| import time | |
| from typing import Callable, Any, Generator, Optional | |
| # -------------------------- | |
| # UnrealTickCoroutine: tick 驱动的协程调度器 | |
| # -------------------------- |
| # ~/.bashrc: executed by bash(1) for non-login shells. | |
| # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
| # for examples | |
| # If not running interactively, don't do anything | |
| [ -z "$PS1" ] && return | |
| # don't put duplicate lines in the history. See bash(1) for more options | |
| # ... or force ignoredups and ignorespace | |
| HISTCONTROL=ignoredups:ignorespace |
| $WSL_DISTRO_NAME = "Debian" | |
| $regPath = Get-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss\*\" ` | |
| | Where-Object { $_.DistributionName -eq $WSL_DISTRO_NAME } ` | |
| | Select-Object -ExpandProperty PSPath | |
| if ($regPath) { | |
| Set-ItemProperty -Path $regPath -Name "RunOOBE" -Value 0 | |
| Set-ItemProperty -Path $regPath -Name "DefaultUid" -Value 0 | |
| Write-Host "Set RunOOBE and DefaultUid to 0 for '$WSL_DISTRO_NAME'" |
| #!/usr/bin/env python3 | |
| import sys | |
| import shlex | |
| def get_cmdline(pid): | |
| with open(f"/proc/{pid}/cmdline") as f: | |
| raw = f.read() | |
| parts = raw.strip("\0").split("\0") | |
| return shlex.join(parts) |
| import base64 | |
| from typing import Any | |
| from pydantic import BaseModel, GetCoreSchemaHandler, TypeAdapter | |
| from pydantic_core import core_schema | |
| from pydantic_core.core_schema import CoreSchema | |
| class BaseEncrypted[T: BaseModel]: | |
| """ |
| function Get-ShortName { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, ValueFromRemainingArguments = $true)] | |
| [string[]] | |
| $Path | |
| ) | |
| begin { | |
| $fso = New-Object -ComObject Scripting.FileSystemObject | |
| } |