Skip to content

Instantly share code, notes, and snippets.

View nickboucher's full-sized avatar

Nicholas Boucher nickboucher

View GitHub Profile
@nickboucher
nickboucher / dns-cloudflare-toggle
Created July 19, 2023 13:54
Toggle Cloudflare DNS on MacOS
#!/usr/bin/env zsh
if networksetup -getdnsservers Wi-Fi | grep -q '1.1.1.1'; then
networksetup -setdnsservers Wi-Fi "Empty"
echo "Cloudflare DNS: \033[1mDisabled\033[0m"
else
networksetup -setdnsservers Wi-Fi 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001
echo "Cloudflare DNS: \033[1mEnabled\033[0m"
fi
@nickboucher
nickboucher / shadow.sh
Created March 23, 2023 19:24
MacOS-Screenshot Drop Shadow + Rounded Corners
# Adds a drop shadow and rounded edges to images
# similar to MacOS App screenshots
#
# Requires ImageMagick:
# brew install imagemagick
#
# Add to ~/.zshrc or ~/.bashrc for easy usage
#
# Usage:
# shadow image.png