Skip to content

Instantly share code, notes, and snippets.

@akordowski
akordowski / RenameWslDistro.ps1
Last active January 10, 2026 19:32
RenameWslDistro.ps1
function Rename-WslDistro {
param (
[string]$OldDistroName,
[string]$NewDistroName
)
Clear-Host
Write-Warning "This function performs a rename operation on the Windows Registry."
$confirm = Read-Host "Do you want to proceed? (y/n)"
@teocci
teocci / how-to-ssh-into-windows.md
Created October 13, 2022 08:07
How to SSH into Windows 10 or 11?

How to SSH into Windows 10 or 11?

The latest builds of Windows 10 and Windows 11 include a build-in SSH server and client that are based on OpenSSH. This means now you can remotely connect to Windows 10/11 or Windows Server 2019 using any SSH client, like Linux distros. Let's see how to configure OpenSSH on Windows 10 and Windows 11, and connect to it using Putty or any other SSH client.

OpenSSH is an open-source, cross-platform version of Secure Shell (SSH) that is used by Linux users for a long time. This project is currently ported to Windows and can be used as an SSH server on almost any version of Windows. In the latest versions of Windows Server 2022/2019 and Windows 11, OpenSSH is built-in to the operating system image.

@3ayazaya
3ayazaya / starship.toml
Last active February 7, 2026 14:32
My Starship terminal configuration file
#format = """
#[╭─user───❯](bold blue) $username
#[┣─system─❯](bold yellow) $hostname
#[┣─project❯](bold red) $directory$rust$git_branch$git_status$package$golang$terraform$docker_context$python$docker_context$nodejs
#[╰─cmd────❯](bold green)
#"""
#format = '$all'
[localip]
ssh_only = false
@gvoze32
gvoze32 / ffmpeg mp3 to mp4.MD
Last active February 25, 2026 14:07
Convert mp3 audio to MP4 using ffmpeg in terminal.

To convert audio mp3 to MP4 by ffmpeg, use the following command

ffmpeg -f lavfi -i color=c=black:s=1280x720:r=5 -i audio.mp3 -crf 0 -c:a copy -shortest output.mp4

Description

This generates mp4 formatted video with blank black background with the color source filter instead of using an image.

Since it is just black video this is one case with lossless mode (-crf 0) will have a smaller file size than the default lossy mode.

@neggles
neggles / Profile.ps1
Last active September 26, 2025 13:28 — forked from apfelchips/Profile.ps1
my crossplatform PowerShell Profile
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# src: https://gist.github.com/neg2led/71aa954bd93750d3c1dadc9302e52654
# New-Item $(Split-Path "$($PROFILE.CurrentUserCurrentHost)") -ItemType Directory -ea 0; Invoke-WebRequest -Uri "https://git\.io/JOL0Xu" -OutFile "$($PROFILE.CurrentUserCurrentHost)"
Clear-Host # remove advertisements
# bash-like
Set-Alias cat Get-Content -Option AllScope
Set-Alias cd Set-Location -Option AllScope
Set-Alias clear Clear-Host -Option AllScope
@estsaon
estsaon / wsl-port-forwarding.md
Last active February 22, 2025 14:58
How to SSH into WSL2 on an external Window

WSL:

  1. Install openssh-server:
sudo apt install openssh-server
  1. Add or uncomment following lines in /etc/ssh/sshd_config:
@daehahn
daehahn / wsl2-network.ps1
Last active September 28, 2025 12:00
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
@kushagharahi
kushagharahi / .Slickdeals URL Cleaner.md
Last active January 22, 2025 18:49
Slickdeals URL Cleaner UserScript

Tired of having to go through referral/affiliate links before you can view a deal on Slickdeals? This script strips the urls on Slickdeals of referrers. If it can't strip the urls, it marks them as "Referral Link?" in hot pink.

Install this UserScript in GreaseMonkey or similar UserScript manager.

before and after script

Note: You must click View Forum Thread (requires login) ![image](https://user-images.githubusercontent.com/3326002/211234558-3e83f0b9-486f-4ab5-ae

@Richard-NL
Richard-NL / c_count.js
Last active January 26, 2021 22:13
aantal per gemeente
// ==UserScript==
// @name Corona count
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.rivm.nl/coronavirus-kaart-van-nederland-per-gemeente
// @grant none
// ==/UserScript==
@SnacksOnAPlane
SnacksOnAPlane / kblister.js
Created October 29, 2019 01:33
Kindle book lister
// ==UserScript==
// @name Kindle Contents
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://read.amazon.com/ref=kcr_app_surl_cloudreader
// @grant none
// ==/UserScript==