Skip to content

Instantly share code, notes, and snippets.

Zane Claes zaneclaes

Block or report user

Report or block zaneclaes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View home-assistant-kiosk.js
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
@zaneclaes
zaneclaes / spellbook-startup.sh
Last active Aug 23, 2019
Startup script for magic spellbook home automation with a Raspberry Pi kiosk and home-assistant.io
View spellbook-startup.sh
#!/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 Jul 17, 2019
Sample kubernetes deployment of multipress: multiple wordpress sites with nginx in a single docker container
View multipress-deployment.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: multipress
labels:
app: multipress
spec:
replicas: 2
selector:
matchLabels:
@zaneclaes
zaneclaes / switchboard-k8s-deployment.yaml
Last active Jul 17, 2019
A simple version of a Switchboard deployment via k8s
View switchboard-k8s-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: switchboard
labels:
app: switchboard
spec:
replicas: 2
minReadySeconds: 5
selector:
@zaneclaes
zaneclaes / certbot_jks.sh
Created Apr 23, 2019
Converts a letsencrypt certificate into a JKS file.
View certbot_jks.sh
#!/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
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel9k/powerlevel9k"
ZSH_DISABLE_COMPFIX=false
POWERLEVEL9K_MODE='nerdfont-complete'
View phone_tablet_as_external_screen.sh
#!/bin/bash
#
# ARG_HELP([Configure a mobile device as an external screen:])
# ARG_POSITIONAL_SINGLE([width],[Width of the external screen])
# ARG_POSITIONAL_SINGLE([height],[Height of the external screen])
# ARG_POSITIONAL_SINGLE([position],[Position of the external screen: top, right, bottom, or left],[position - right])
# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.6.1 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
View GRPC Cross Make
[CLEAN] Cleaning build directories.
[MAKE] Generating /work/libs/opt/pkgconfig/grpc.pc
[MAKE] Generating /work/libs/opt/pkgconfig/grpc_unsecure.pc
[MAKE] Generating cache.mk
[CXX] Compiling src/core/lib/gpr/alloc.cc
[CXX] Compiling src/core/lib/gpr/arena.cc
[CXX] Compiling src/core/lib/gpr/atm.cc
[CXX] Compiling src/core/lib/gpr/avl.cc
[CXX] Compiling src/core/lib/gpr/cmdline.cc
[CXX] Compiling src/core/lib/gpr/cpu_iphone.cc
View function.rb
# 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:
View graphql.rb
# 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:
You can’t perform that action at this time.