This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
con="${1}" | |
if [[ -z "$con" ]]; then | |
echo "Please provide an interface name as an argument." | |
exit 1 | |
fi | |
while true; do | |
conns=$(nmcli con show "$con" | grep "GENERAL.STATE:" | grep "activated") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
interfaces=(eth0 eth1 eth2) # which interfaces to auto-detect, in descending order of priority | |
interface="eth0" # the default/current interface | |
while true; do | |
newif="$interface" | |
for i in "${interfaces[@]}"; do | |
if $(ip link show dev "$i"); then | |
newif="$i" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: multipress | |
labels: | |
app: multipress | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: switchboard | |
labels: | |
app: switchboard | |
spec: | |
replicas: 2 | |
minReadySeconds: 5 | |
selector: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |