Skip to content

Instantly share code, notes, and snippets.

View zaneclaes's full-sized avatar

Zane Claes zaneclaes

View GitHub Profile
@zaneclaes
zaneclaes / electronize start
Created May 28, 2021 00:24
electronize start logs
Start Electron Desktop Application...
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
/Users/zaneclaes/zdrive/zaneclaes/Programming/OWE/src/OpenWorkShop/OpenWorkShop.csproj : warning NU1701: Package 'ArduinoDriver 2.4.6' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project. [/Users/zaneclaes/zdrive/zaneclaes/Programming/OWE/src/OpenWorkShop/OpenWorkShop.sln]
/Users/zaneclaes/zdrive/zaneclaes/Programming/OWE/MakerHub/MakerHub.csproj : warning NU1701: Package 'ArduinoDriver 2.4.6' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramewor
if (window.location.href.indexOf('kiosk') > 0) {
setTimeout(function () {
try {
const home_assistant_main = document
.querySelector("body > home-assistant").shadowRoot
.querySelector("home-assistant-main");
const header = home_assistant_main.shadowRoot
.querySelector("app-drawer-layout > partial-panel-resolver > ha-panel-lovelace").shadowRoot
.querySelector("hui-root").shadowRoot
client> $$
$0=10 (Step pulse time, microseconds)
$1=25 (Step idle delay, milliseconds)
$2=0$3=0 (Step pulse invert, mask)
$4=0 (Invert step enable pin, boolean)
$5=0 (Invert limit pins, boolean)
$6=0 (Invert probe pin, boolean)
$10=1 (Status report options, mask)
$11=0.010 (Junction deviation, millimeters)
$12=0.002 (Arc tolerance, millimeters)
@zaneclaes
zaneclaes / update-route53.py
Created March 18, 2020 17:23
Update route53 via AWS CLI with the current IP address. Usage: "update-route53.py subdomain1 subdomain2 domain-name.com"
#!/usr/bin/env python3
import subprocess, re, os, json, sys
zones = None
def _sh(cmd):
return subprocess.run(cmd, shell=True, check=True, capture_output=True, text=True).stdout.strip()
def _whatsmyip():
return _sh('dig +short myip.opendns.com @resolver1.opendns.com')
@zaneclaes
zaneclaes / spellbook-startup.sh
Last active November 24, 2019 09:54
Startup script for magic spellbook home automation with a Raspberry Pi kiosk and home-assistant.io
#!/bin/bash
#
# ARG_POSITIONAL_SINGLE([home-assistant-address],[root URL of home assistant])
# ARG_OPTIONAL_BOOLEAN([tvservice],[],[tvservice on],[on])
# ARG_OPTIONAL_BOOLEAN([usb],[],[USB on],[on])
# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.8.1 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info
@zaneclaes
zaneclaes / multipress-deployment.yml
Last active July 17, 2019 04:09
Sample kubernetes deployment of multipress: multiple wordpress sites with nginx in a single docker container
apiVersion: apps/v1
kind: Deployment
metadata:
name: multipress
labels:
app: multipress
spec:
replicas: 2
selector:
matchLabels:
@zaneclaes
zaneclaes / switchboard-k8s-deployment.yaml
Last active July 17, 2019 03:52
A simple version of a Switchboard deployment via k8s
apiVersion: apps/v1
kind: Deployment
metadata:
name: switchboard
labels:
app: switchboard
spec:
replicas: 2
minReadySeconds: 5
selector:
# MIT License
#
# Copyright (c) 2018, Zane Claes
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# MIT License
#
# Copyright (c) 2018, Zane Claes
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@zaneclaes
zaneclaes / certbot_jks.sh
Created April 23, 2019 16:11
Converts a letsencrypt certificate into a JKS file.
#!/bin/bash
# Converts a letsencrypt certificate into a JKS file.
# Usage:
# ./certbot_jks.sh [domain_name] [email]
le_dir="/etc/letsencrypt"
domain=${1}
email=${2}
OUT_DIR=${le_dir}/live/${domain}
GATE_EXPORT_PASSWORD=test1234