Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
😎

Alex van den Hoogen alex3305

💭
😎
  • Geodan
  • Tilburg, Netherlands
View GitHub Profile
View OZW_full.log
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
View gist:a1e87356417687099bf5a5a1387f5308
function fmtPassphrase(args) { return true; }
fmtPassphrase(args)L1388: strength = 3
@alex3305
alex3305 / move.md
Last active Apr 23, 2020
Move Home Assistant install to USB
View move.md

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 / gitrecursive.go
Created Nov 20, 2015
Git recursive pull
View gitrecursive.go
package main
import (
"io/ioutil"
"os"
"log"
"os/exec"
"bytes"
)
@alex3305
alex3305 / gobuild.bat
Created Feb 7, 2015
Windows Go Shortcuts
View gobuild.bat
@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 Jan 13, 2015
Spring Integration Java DSL test
View Application.java
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 Jan 5, 2015
Byte Order Mark Utility
View BOMUtil.java
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;
@alex3305
alex3305 / stream.js
Last active Aug 29, 2015
Streaming client for Javascript.
View stream.js
// Streaming function for Javascript, wrapped as a jQuery function.
// @param url URL of the receive.
// @param callback Callback function on when data is received. When no callback is
// provided, the received data will be written to console.log().
(function($) {
$.Stream = function(url, callback) {
var xhr = internalXHR();
var length = 0;
if (callback === undefined) { callback = function(text) { console.log(text); } }
View json-joiner.js
JSON.Join = function(jsons) {
var retJson = {};
for (var j1 in jsons) { for (var j2 in jsons[j1]) { retJson[j2] = jsons[j1][j2]; } }
return retJson;
};
@alex3305
alex3305 / rest.go
Created Aug 28, 2014
Very, very simple REST controller in Go with Hello World and Kill switch
View rest.go
package main
import (
"github.com/bmizerany/pat"
"log"
"net/http"
"os"
)
func main() {