Skip to content

Instantly share code, notes, and snippets.

View dotWee's full-sized avatar
🧑‍🎨
N06 G41 G00 X1.1 Z1.1 T0303 M08

Lukas Wolfsteiner dotWee

🧑‍🎨
N06 G41 G00 X1.1 Z1.1 T0303 M08
View GitHub Profile
@leminlimez
leminlimez / Domains.md
Last active December 26, 2024 17:37
A deep dive into the iOS backup/restore system

Domains.plist

Documentation of /System/Library/Backup/Domains.plist. File taken from iOS 16.4 iPhone SE 3. The file was removed in iOS 17.0

Values

Values in the plist. Other than SystemDomains, these are not really important and are just here for preservation sake.

A domain in domains.plist contains keys that determine what gets backed up for what types of devices and where (i.e. iCloud vs iTunes). Not all domains have each key. The only 2 keys that must be in every domain are RootPath and RelativePathsToBackupAndRestore. Some domains have the value ShouldDigest. I am not sure exactly what it means but I have included it for documentation purposes.

  • Version: "24.0"
  • SystemDomains: (Dictionary), see below
# This is a anonymized version of the script I use to renew all my SSL certs
# across my servers. This will not work out of the box for anyone as your network will be
# different. But may be useful starting place for others.
#
# I use a cronjob that runs this every week. It only replaces certificates when a certificate has been renewed.
# Renews/creates cert from letsencrypt & places it where it needs to be.
# Currently, that is:
# * Nginx (local for plex)
# * Plex Media Server
@PicoMitchell
PicoMitchell / man2pdf.sh
Last active November 30, 2024 08:10
Display "man" pages as PDFs on macOS, with nice filenames and caching.
#!/bin/sh
man2pdf() {
##
## Created by Pico Mitchell (of Random Applications) on 11/16/22
##
## https://gist.github.com/PicoMitchell/619c12fd6a53ae6ec657514915d4edf9
##
## MIT License
##
@greghesp
greghesp / esphome_ble_config.yaml
Last active May 26, 2023 18:01 — forked from kmdm/esphome_ble_config.yaml
esphome, esp32 ble tracker and Home Assistant mqtt_room sensors
# MQTT broker configuration
mqtt:
broker: !secret mqtt_broker
username: !secret mqtt_username
password: !secret mqtt_password
discovery: False # Only if you use the HA API usually
id: mqtt_client
# Define the room for this ESP32 node
substitutions:
@HarHarLinks
HarHarLinks / Mixcloud RSSifier
Last active October 9, 2024 14:30 — forked from ilevantis/Mixcloud RSSifier
Turn mixcloud streams into an RSS feed e.g. for mixcloud.com/<mixcloudstream>/playlists/<streamplaylist-if-there-is-one>/ go to mysite.com/mixcloud-rssifier/?fname=<mixcloudstream>&lname=<streamplaylist-if-there-is-one> to get an RSS feed of the stream or the playlist from the stream
<?php
header('Content-Type: application/rss+xml; charset=UTF-8');
// suck in the query string variables
$feed_name = htmlspecialchars($_GET['fname']);
$list_name = htmlspecialchars($_GET['lname']);
// compose the api urls + other stuff depending on presence of playlist
if(isset($_GET['lname'])) {
$json_url = 'http://api.mixcloud.com/'.$feed_name.'/playlists/'.$list_name.'/cloudcasts/';
#!/usr/bin/env python3
# Domain Search Option Format generator for Unifi Security Gateway
# Usage: python3 dhcp_option_119.py example.com example.net
import sys
hexes = []
for domain in sys.argv[1:]:
for label in domain.split('.'):
hexes.append('%02x' % len(label))
@bruvv
bruvv / Repair synology BTRFS volume
Created December 6, 2019 18:12
Synology BTRFS repair
btrfs fi show -d
(/dev/mapper/vg1000-lv)
syno_poweroff_task -d
(or: umount /volume1)
(or2: umount /volume1 -f -k)
Check to see if all us unmounted:
df -h
@n8henrie
n8henrie / repair.sh
Last active July 7, 2021 00:16
Fix time machine backup
#!/usr/bin/env bash
# http://tonylawrence.com/post/unix/fixing-corrupted-time-machine-backups/
set -euf -o pipefail
set -x
if [[ $(whoami) != 'root' ]]; then
echo "Please run as root" > /dev/stderr
exit 1
fi
@PattaFeuFeu
PattaFeuFeu / HA_Migrate-sqlite-to-mysql.md
Last active December 8, 2024 05:04
Steps necessary to migrate from HomeAssistant’s standard sqlite database to an external MariaDB(10) SQL database

Migrate Home Assistant’s sqlite database to MySQL, specifically MariaDB (10)

After having added a decent amount of entities to my Home Assistant setup, the user interface—especially the history tab, but also the history for each entity—became very sluggish. Having to wait for up to 30 seconds to see the history graph for a single entity became the norm with an sqlite file weighing in at 6GB and millions of entries in the “events” and “states” tables.

I wanted to keep my acquired data, so I had to migrate it from the current sqlite file to a MySQL database instead of starting anew. I’ve done this using Home Assistant version 0.81 and MariaDB 10. Some parts might change in the future.

Dump Home Assistant sqlite database