Skip to content

Instantly share code, notes, and snippets.

@camerahacks
camerahacks / Rock_CM3_Setup.md
Last active June 9, 2023 00:17
Rock CM3 Setup

Radxa Rock CM3 on a CM4 carrier board

Out of the box, the Radxa Rock CM3 does not work with boards designed for the Raspberry Pi CM4. Here are the steps to get the most functionlity working on a CM4 board.

Before we get started, if you appreciate the work I do with rpilocator.com, hwlocator.com, and dphacks.com, consider buying me a coffee.

ko-fi

First Boot Config

@dgrnbrg
dgrnbrg / appdaemon_irk.yaml
Last active November 30, 2023 13:09
Randomized key resolution for apple device tracking
tracker_test:
class: IrkTracker
module: irk_tracker
training_input_text: input_text.irk_tag
data_loc: tracker_logs/
rows_per_flush: 100
@quonic
quonic / PID.ps1
Last active July 27, 2023 18:08
A PID controller class adapted for PowerShell. Made it because I haven't seen anyone make one for PowerShell.
#Requires -Version 5
# License: MIT
class PID {
# Adapted to PowerShell from: https://github.com/tommallama/CSharp-PID/blob/master/PID_Controller/PID.cs
#region Public Variables
# Upper output limit of the controller.
# This should obviously be a numerically greater value than the lower output limit.
@krzys-h
krzys-h / Hyper-V GPU-PV with Linux guest.md
Last active July 21, 2024 06:40
Ubuntu 21.04 VM with GPU acceleration under Hyper-V...?

Ubuntu 21.04 VM with GPU acceleration under Hyper-V...?

Modern versions of Windows support GPU paravirtualization in Hyper-V with normal consumer graphics cards. This is used e.g. for graphics acceleration in Windows Sandbox, as well as WSLg. In some cases, it may be useful to create a normal VM with GPU acceleration using this feature, but this is not officially supported. People already figured out how to do it with Windows guests though, so why not do the same with Linux? It should be easy given that WSLg is open source and reasonably well documented, right?

Well... not quite. I managed to get it to run... but not well.

How to do it?

  1. Verify driver support
@howellcc
howellcc / backupHubitat.sh
Last active May 11, 2024 11:32
Backup script for Hubitat Elevation that runs on Synology NAS
#!/bin/bash
#https://gist.github.com/howellcc/70f5c45a9902f9a3fe4e566ceedf1bca
#This is a backup script that I'm running on my Synology NAS to back up my Hubitat Elevation.
he_login=[Hubitat Username]
he_passwd=[Hubitat Password]
he_ipaddr=[Hubitat IP Address]
backupdir='[Backup Location]' #no trailing space
hubname='Hubitat' #in case you have multiple hubs
@archmangler
archmangler / linux-pwshell-windns-management.txt
Last active September 22, 2023 22:29
PowerShell Remoting from Linux to Windows (DNS Server Configuration)
Overview
========
This is a set of notes I kept resulting in development of a terraform module wrapper to configure windows DNS.
(Original gist location: https://gist.github.com/1de3be6a95400bce427008e04e53e26f)
Objective:
=========
@Desani
Desani / ScanMedia.md
Last active May 27, 2024 00:39
3.6 - Corrected issues with determining terminal size in specific use cases. Added file encoding thanks to recommendation by LordKenmou. Fixed update script checker.

This script utilizes ffmpeg, the same tool Plex uses, to decode the video stream and captures the output for any errors during playback and sends the playback errors to a log file. So essentially it plays the video in the background faster than regular speed. It then checks the error output log file to see if there is anything inside. If ffmpeg was able to cleanly play the file, it counts as a passed file. If there is any error output, an error could be anything from a container issue, a missed frame issue, media corruption or more, it counts the file as failed. So if there would be an issue with playback and a video freezing, it would be caught by this method of checking for errors. Because of the nature of the error log, any errors that show up, even simple ones, will all count as a fail and the output is captured so you can view the error log. Some simple errors are easy to fix so I have included an auto-repair feature which attempts to re-encode the file which is able to correct some issues that would cau

@shadone
shadone / speedtest_tester.sh
Created February 6, 2016 23:03
Send speedtest.net results to influxdb
#!/bin/bash
INFLUXDB_HOST="localhost"
INFLUXDB_PORT="8086"
DATABASE="home"
[ -f /etc/default/speedtest_tester ] && . /etc/default/speedtest_tester
while [[ $# > 0 ]]; do
key="$1"
@corny
corny / unifi-backup.sh
Last active January 26, 2024 02:07
Improved backup script for Ubiquiti UniFi controller
#!/bin/bash -e
#
# Improved backup script for Ubiquiti UniFi controller
# original source: http://wiki.ubnt.com/UniFi#Automated_Backup
#
# must contain:
# username=<username>
# password=<password>
source ~/.unifi-backup
@urasandesu
urasandesu / Get-HelpByMarkdown.ps1
Last active August 5, 2023 04:12
This script converts PowerShell comment-based help to GitHub Flavored Markdown.
#
# File: Get-HelpByMarkdown.ps1
#
# Author: Akira Sugiura (urasandesu@gmail.com)
#
#
# Copyright (c) 2014 Akira Sugiura
#
# This software is MIT License.
#