This file contains 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
<!doctype html> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="robots" content="noindex"> | |
<title>~</title> | |
<script>WebFontConfig={google:{families:['Lato:300:latin']}};</script> | |
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" async></script> |
This file contains 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
Host azbastion | |
HostName emingueztestb.eastus2.cloudapp.azure.com | |
User edu | |
StrictHostKeyChecking no | |
ProxyCommand none | |
CheckHostIP no | |
IdentityFile ~/.ssh/id_rsa_azure | |
Host azmaster? azinfranode? aznode?? | |
ProxyCommand ssh azbastion -W $(sed -e "s/az//" <<< "%h"):%p |
This file contains 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 | |
MQTT_HOST=${MQTT_HOST:-localhost} | |
MQTT_ID=${MQTT_ID:-n54l} | |
MQTT_TOPIC=${MQTT_TOPIC:-n54l/input/temp} | |
MQTT_OPTIONS=${MQTT_OPTIONS:-"-V mqttv311"} | |
# Raw message to MQTT | |
# https://github.com/shakemid/pcsensor-temper | |
TEMP=$(/home/edu/bin/pcsensor -c | awk '{ print $4 }') | |
/usr/bin/mosquitto_pub -h ${MQTT_HOST} -i ${MQTT_ID} -t ${MQTT_TOPIC} ${MQTT_OPTIONS} -m "${TEMP}" |
This file contains 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
# Cura app image | |
sudo dnf install -y libglvnd-devel | |
# Create a file | |
/home/edu/.local/share/applications/cura.desktop | |
[Desktop Entry] | |
Name=Cura | |
GenericName=3D Printing Software | |
Comment=Cura converts 3D models into paths for a 3D printer. It prepares your print for maximum accuracy, minimum printing time and good reliability with many extra features that make your print come out great. | |
Exec=/home/edu/bin/cura %F | |
TryExec=/home/edu/bin/cura |
This file contains 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 | |
# Use it with /usr/sbin/hostapd_cli -i wlan1 -a /root/hostapd/notify.sh -B | |
HASS="http://192.168.1.2:8123" | |
SCOTTEX="xx:xx:xx:xx:xx:xx" | |
FAIRY="yy:yy:yy:yy:yy:yy" | |
CURL="/usr/bin/curl -s" | |
MAC=$3 | |
if [[ $2 == "AP-STA-CONNECTED" ]] | |
then |
This file contains 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
--- | |
- hosts: masters | |
gather_facts: no | |
become: true | |
tasks: | |
- name: Get controller ID in all masters | |
shell: | | |
journalctl -b -u atomic-openshift-master-controllers.service --output cat | grep "Attempting to acquire controller lease as" | tail -1 | awk '{ print $11 }' | sed 's/,//' | |
changed_when: False | |
register: masterid |
This file contains 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
#!/usr/bin/env bash | |
STEPS="0.1" | |
MONITORS="DP-2-1 DP-2-2" | |
echo "|iconName=weather-clear" | |
echo "---" | |
for i in $(seq 1.0 -${STEPS} ${STEPS}) | |
do |
This file contains 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
HASS="http://x.x.x.x:8123" | |
CURL="curl -s -X GET -H 'Content-Type: application/json' ${HASS}/api/states" | |
TI=$(${CURL}/sensor.temperature | jq -r '.state') | |
TO=$(${CURL}/sensor.temperature_outside | jq -r '.state') | |
HO=$(${CURL}/sensor.humidity_outside | jq -r '.state') | |
echo "${TI}º |" | |
echo "---" | |
echo "${TO}º outside" |
This file contains 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
#version=DEVEL | |
# Network installation | |
url --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch | |
#url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-$releasever&arch=$basearch | |
repo --name=fedora | |
repo --name=updates | |
# System authorization information | |
auth --enableshadow --passalgo=sha512 |
This file contains 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
#!/usr/bin/env python | |
import ruamel.yaml | |
import os | |
import socket | |
import fcntl | |
import struct | |
# https://stackoverflow.com/questions/24196932/how-can-i-get-the-ip-address-of-eth0-in-python/30990617 | |
def get_ip_address(ifname): |