Skip to content

Instantly share code, notes, and snippets.

@krcm0209
krcm0209 / cleanup_git_branches.sh
Created March 10, 2022 17:13
Helper script to delete local git branches which no longer exist on the remote.
#!/bin/sh
git fetch -p
branches_with_gone_remote=$(
git for-each-ref --format '%(refname) %(upstream:track)' refs/heads |
awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'
)
for branch in ${branches_with_gone_remote}
do
git branch -D $branch
@krcm0209
krcm0209 / README.md
Last active May 29, 2024 23:46
Using AdGuard DNS over HTTPS (DoH) on Windows 11

Why

You may want to use AdGuard's DNS over HTTPS[^2] service if you

  1. Want to make it harder for your ISP to know what websites you are requesting
  2. Want to block most traditional ads from your web browsing experience across your entire PC

Setup instructions

  1. Open PowerShell