Skip to content

Instantly share code, notes, and snippets.

View mikeoertli's full-sized avatar

Mike Oertli mikeoertli

View GitHub Profile
@rspier
rspier / rainmachine-tailscale.md
Last active June 4, 2023 00:13
How to Install Tailscale on a RainMachine HD-12
@Acqua-H
Acqua-H / panel-redirect.js
Last active December 14, 2022 11:17 — forked from balloob/panel-redirect.js
Add items to the Home Assistant sidebar to any path in Home Assistant
/*************************************************************************************************************************
* Purpose: Add items to the Home Assistant sidebar to any path in Home Assistant
* Many thanks to balloob https://gist.github.com/balloob for his initial code (see link in Change Log)
* -------------------------------------------------------------------------------------------------------
* Resources and References:
* - Current Code Source https://gist.github.com/Acqua-H/a33ef5bd5a95f14c5888494565bb0436
* - HA Forum Thread https://community.home-assistant.io/t/how-to-add-a-restart-home-assistant-button-to-sidebar/214179/2
* - Acqua https://github.com/Acqua-H/ | https://community.home-assistant.io/u/acqua/
* -------------------------------------------------------------------------------------------------------
* Change Log:
asyncapi: 2.0.0
# ---
id: 'urn:dalelane:stock-level-events'
# ---
info:
title: Stock level events
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 4, 2024 04:13
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@planetceres
planetceres / RESET_USB_KERNEL_MODULE.md
Last active May 4, 2024 14:11
Restart/reset USB kernel module in Ubuntu 18.04 without rebooting
@dojoe
dojoe / dkms-module-signing.md
Last active April 24, 2024 18:50
Make DKMS sign kernel modules on installation, with full script support and somewhat distro independent

On systems with UEFI Secure Boot enabled, recent Linux kernels will only load signed modules, so it's about time DKMS grew the capability to sign modules it's building.

These scripts are extended and scriptified variants of https://computerlinguist.org/make-dkms-sign-kernel-modules-for-secure-boot-on-ubuntu-1604.html and https://askubuntu.com/questions/760671/could-not-load-vboxdrv-after-upgrade-to-ubuntu-16-04-and-i-want-to-keep-secur/768310#768310 and add some error checking, a passphrase around your signing key, and support for compressed modules.

dkms-sign-module is a wrapper for the more generic sign-modules which can also be used outside of DKMS.

Installation

  1. Create a directory under /root, say /root/module-signing, put the three scripts below in there and make them executable: chmod u+x one-time-setup sign-modules dkms-sign-module

Get/set ID3 meta tags using ffmpeg

A quick guide on how to read/write/modify ID3 metadata tags for audio / media files using ffmpeg.

FFmpeg has a free-form command line option that allows the user to specify key-value-pairs for encoding metadata. Let's take a look.

1. Read ID3 metadata

To list all global metadata tags for a media file, just set an input but no output file.

@davydany
davydany / IPTABLES-CHEATSHEET.md
Last active May 17, 2024 07:55
IP Tables (iptables) Cheat Sheet

IP Tables (iptables) Cheat Sheet

IPTables is the Firewall service that is available in a lot of different Linux Distributions. While modifiying it might seem daunting at first, this Cheat Sheet should be able to show you just how easy it is to use and how quickly you can be on your way mucking around with your firewall.

Resources

The following list is a great set of documentation for iptables. I used them to compile this documentation.

#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
@patpohler
patpohler / Big List of Real Estate APIs.md
Last active May 16, 2024 15:41
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.