Skip to content

Instantly share code, notes, and snippets.

<#
.SYNOPSIS
Recovers Docker Desktop on Windows 11 / WSL2 when the engine is stuck
on "Starting the Docker Engine..." with the VM running but dockerd
unresponsive inside it.
.\Repair-DockerDesktop.ps1 # full run, safe default
.\Repair-DockerDesktop.ps1 -StartFromStage 2 # skip clean restart
.\Repair-DockerDesktop.ps1 -StageTimeoutSec 300 # give each stage 5 min
@zaherkarp
zaherkarp / osx-set-all-names.sh
Created February 6, 2020 04:42 — forked from jacobsalmela/osx-set-all-names.sh
Set all four OS X computer names using a script.
#!/bin/bash
# Bonjour name ending in .local
scutil --set LocalHostName "My-iMac"
# Friendly name shown in System Preferences > Sharing
scutil --set ComputerName "My-iMac"
# The name recognized by the hostname command
scutil --set HostName "My-iMac"
# Save the computer's serial number in a variable so it can be used in the next command.
serialNum=$(ioreg -l | awk '/IOPlatformSerialNumber/ { split($0, line, "\""); printf("%s\n", line[4]); }')
# Set the NetBIOS name as the serial number