Skip to content

Instantly share code, notes, and snippets.

@sethenoka
sethenoka / osxsettings.sh
Last active February 26, 2024 04:29
Mac OS X Initial Setup Script
#!/usr/bin/env bash
# Ref: ~/.macos — https://mths.be/macos
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v
@sethenoka
sethenoka / Pretty_Headers.vba
Created September 13, 2019 06:23
A simple macro to quickly make the header row of an excel sheet prettier
Sub Pretty_Headers()
' A simple macro to quickly make the header row of an excel sheet prettier
' Designed to:
' 1. Colour all header cells
' 2. Colour all header cell text
' 3. Bold all header cell text
' 4. Apply autofilter to the header row
' 5. Freeze the top row of the sheet
'
' The macro will apply to the active sheet
@sethenoka
sethenoka / wireguard_pihole_install.sh
Created March 21, 2019 21:28
A script for installing a Wireguard VPN with Pi-Hole (Unbound) recursive DNS
#!/bin/bash
# This file is designed to spin up a Wireguard VPN quickly and easily,
# including configuring Pi-Hole as a recursive local DNS server using
# Unbound to block ads a the DNS level
#
# Make sure to change the public/private keys before running the script
# Also change the IPs, IP ranges, and listening port if desired
# add wireguard repo
sudo add-apt-repository ppa:wireguard/wireguard -y
@sethenoka
sethenoka / wg_install.sh
Last active April 25, 2021 04:17
A script to spin up a Wireguard VPN server with Unbound recursive DNS in a hurry
#!/bin/bash
# This file is designed to spin up a Wireguard VPN quickly and easily,
# including configuring a recursive local DNS server using Unbound
#
# Make sure to change the public/private keys before running the script
# Also change the IPs, IP ranges, and listening port if desired
# iptables-persistent currently requires user input
# add wireguard repo
sudo add-apt-repository ppa:wireguard/wireguard -y