Skip to content

Instantly share code, notes, and snippets.

View n8felton's full-sized avatar
🍎

Nate Felton n8felton

🍎
View GitHub Profile
@talkingmoose
talkingmoose / Sonoma-compatible Macs (regex)
Last active December 10, 2023 17:14
Regex looks for all Mac models compatible with macOS Sonoma. May not be up-to-date with newly released models.
https://support.apple.com/en-us/HT213772
Published Date: November 15, 2023
Verification: https://regex101.com/r/GCfKMt/9
1) Exact regex — Matches major model identifier numbers based on Apple's knowledge base article (more accurate):
^(Mac(1[345]|BookPro1[5-8]|BookAir([89]|10)|Pro7)|iMac(Pro1|(19|2[01]))|Macmini[89]),\d+$
2) Current or higher regex — Matches model identifiers based on Apple's knowledge base article and may match higher versions before this regex is updated (more future-proof).
@Blackshome
Blackshome / bathroom-humidity-exhaust-fan.yaml
Last active May 23, 2024 20:01
bathroom-humidity-exhaust-fan.yaml
blueprint:
name: Bathroom Humidity Exhaust Fan
description: >
# 🚿 Bathroom Humidity Exhaust Fan
**Version: 2.3**
Step into the future of freshness - customize it your way and let the automated fan system handle the humidity control for you! 🌿🚿
@randyburden
randyburden / Updating Apple Pay Certificates.md
Created October 3, 2022 15:52
How to update Apple Pay certificates that are expiring

Updating Apple Pay Certificates

Overview

This document covers how to update the following Apple Pay certificates:

  • Apple Pay Payment Processing Certificate
    • Used to decrypt Apple Pay requests
  • Apple Pay Merchant Identity Certificate
    • Used to make requests to Apple Pay APIs
@magnetikonline
magnetikonline / README.md
Last active May 3, 2024 12:20
Install jq on macOS from source.

Install jq on macOS from source

Note: as of jq v1.7 the project offers pre-built native macOS releases for ARM64 based architechtures.

A quick n' dirty Bash script to install the following:

  • autoconf.
  • automake.
  • libtool
  • jq - from source.
@brunerd
brunerd / kcpasswordEncode.sh
Last active July 31, 2022 11:46
Encode a string for use in macOS /etc/kcpassword using shell, printf, sed, awk and xxd
#!/bin/bash
#kcpasswordEncode (20220610) Copyright (c) 2021 Joel Bruner (https://github.com/brunerd)
#Licensed under the MIT License
#given a string creates data for /etc/kcpassword
function kcpasswordEncode () (
#ascii string
thisString="${1}"

How to play ASCII-Art Star Wars offline

Following will teach you how to play the "easter-egg" (which actually isn't, but many people describe this as an easter egg) of ASCII-Art Star Wars (or Star Wars in terminal/telnet, whatever), the one you normally starts like this:

$ telnet towel.blinkenlights.nl
  1. Before you start, ensure Node.js is installed.
  2. Navigate to www.asciimation.co.nz, the original home of that ASCII-Art Star Wars.
  3. Press F12 to open developer tools.
@skywinder
skywinder / gitkraken.zsh
Last active October 25, 2022 15:37 — forked from dersam/gitkraken.zsh
Here is a single line to add kraken support in `.zshrc`
# Open GitKraken using the current repo directory in the cli.
alias kraken='open -na "GitKraken" --args -p "$(git rev-parse --show-toplevel)"'
# Now you can 'git kraken'!
@heywoodlh
heywoodlh / README.md
Last active March 19, 2023 21:00
Auth logging on MacOS using the log command
mkdir -p /opt/scripts
mkdir -p /var/log/custom
mkdir -p /var/root/Library/LaunchAgents


curl 'https://gist.githubusercontent.com/heywoodlh/0295135b9e24ec0729571497c9ab5a77/raw/b3032d9a563c956f574176c39cb2a5382f8c579c/auth-log.sh' -o /opt/scripts/auth-log.sh
chmod +x /opt/scripts/auth-log.sh

@grihabor
grihabor / Makefile.version
Last active April 24, 2024 18:18
Makefile to use for incremental semantic versioning
MAKE := make --no-print-directory
DESCRIBE := $(shell git describe --match "v*" --always --tags)
DESCRIBE_PARTS := $(subst -, ,$(DESCRIBE))
VERSION_TAG := $(word 1,$(DESCRIBE_PARTS))
COMMITS_SINCE_TAG := $(word 2,$(DESCRIBE_PARTS))
VERSION := $(subst v,,$(VERSION_TAG))
VERSION_PARTS := $(subst ., ,$(VERSION))
@JackGruber
JackGruber / Get-ProcessOutput.ps1
Created May 11, 2018 17:12
Execute a process and return the output from standard output and standard error
function Get-ProcessOutput
{
Param (
[Parameter(Mandatory=$true)]$FileName,
$Args
)
$process = New-Object System.Diagnostics.Process
$process.StartInfo.UseShellExecute = $false
$process.StartInfo.RedirectStandardOutput = $true