Skip to content

Instantly share code, notes, and snippets.

View alex3305's full-sized avatar
🤦‍♂️

Alex van den Hoogen alex3305

🤦‍♂️
View GitHub Profile
@alex3305
alex3305 / plex-wol.service
Created August 14, 2023 11:54
Plex Wake On Demand
[Unit]
Description=Plex Wake on Demand Service
[Service]
User=root
Type=simple
ExecStart=/bin/bash /opt/scripts/plex-wol.sh
KillMode=mixed
[Install]
@alex3305
alex3305 / move.md
Last active February 6, 2023 07:11
Move Home Assistant install to USB

Move Home Assistant install to USB

This document describes the moving of all the Home Assistant data to an USB storage device. Everything in this guide was done on a Raspberry Pi 3B+ with Raspbian. To get things started we want to be sudo for all of this with sudo -s.

This should apply to manual Hass.io installs only.

This only moves the (Docker) data to the external disk, not the install itself.

@alex3305
alex3305 / climate-v4.yaml
Last active December 20, 2022 22:27
Home Assistant Climate Subview v4 (partial)
views:
- theme: Backend-selected
title: Klimaat
path: climate
type: custom:horizontal-layout
icon: mdi:thermometer
subview: true
badges: []
cards:
- type: vertical-stack
This file has been truncated, but you can view the full file.
[17:06:40] INFO: Auth database exists
[17:06:42] INFO: Connected to internal MQTT service
[17:06:42] INFO: Starting internal MQTT broker...
[17:06:42] INFO: Starting OpenZWave...
ozw.daemon: Checking "/data/ozw/config" for manufacturer_specific.xml
ozw.daemon: Checking "/data/ozw/config" for options.xml
ozw.daemon: DBPath: "/data/ozw/config/"
ozw.daemon: userPath: "/data/ozw/config/"
ozw.daemon: Network Key Specified in Enviroment is Invalid
@alex3305
alex3305 / index.php
Last active November 12, 2019 07:30
HTML to PDF converter with marginless cover page with Snappy and PDF Merge
<?php
/**
* PDF exporter for Mediawiki. This will load a specified content page and
* will append a seperate, specified cover page to the returning document.
*
* Requirements:
* - PHP 5.1+
* - wkhtmltox (wkhtmltopdf) 0.12+ (http://www.wkhtmltopdf.org)
* - KnpLabs Snappy (https://github.com/KnpLabs/snappy/)
* - PDF Merger for PHP (http://pdfmerger.codeplex.com/)
@alex3305
alex3305 / gist:a1e87356417687099bf5a5a1387f5308
Created June 8, 2019 13:35
hacking connectbox wifi password
function fmtPassphrase(args) { return true; }
fmtPassphrase(args)L1388: strength = 3
@alex3305
alex3305 / gitrecursive.go
Created November 20, 2015 08:45
Git recursive pull
package main
import (
"io/ioutil"
"os"
"log"
"os/exec"
"bytes"
)
@alex3305
alex3305 / gobuild.bat
Created February 7, 2015 11:29
Windows Go Shortcuts
@echo off
setlocal EnableDelayedExpansion
for /f %%A in ('forfiles /s /m *.go /c "cmd /c echo @relpath"') do SET "files=!files! %%~A"
go build %files%
ENDLOCAL
@alex3305
alex3305 / Application.java
Created January 13, 2015 15:00
Spring Integration Java DSL test
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.channel.QueueChannel;
import org.springframework.messaging.support.GenericMessage;
import org.springframework.util.Assert;
@alex3305
alex3305 / BOMUtil.java
Created January 5, 2015 12:44
Byte Order Mark Utility
import java.io.*;
/** Source: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6206835 */
public class BOMUtil {
public final static int NONE=-1;
public final static int UTF32BE=0;
public final static int UTF32LE=1;
public final static int UTF16BE=2;
public final static int UTF16LE=3;
public final static int UTF8=4;