Skip to content

Instantly share code, notes, and snippets.

View jorisroovers's full-sized avatar

Joris Roovers jorisroovers

View GitHub Profile
#!/bin/bash
# Set the ubuntu user password to something useable for VNC/KVM console access
passwd ubuntu <<EOF
ubuntu
ubuntu
EOF
# Since we have non-secure Dynamic DNS updates available in the ctocllab domain
# this will update a ctocllab.cisco.com entry
@jorisroovers
jorisroovers / functions.sh
Created June 4, 2014 12:55
Generic bash snippets
# Asserts that the script was invoked with valid arguments
assert_usage(){
if [ $# -ne 1 ]; then
echoerr "Usage: $0 (start | start | develop)"
exit 1
fi
}
### Keybase proof
I hereby claim:
* I am jorisroovers on github.
* I am jorisroovers (https://keybase.io/jorisroovers) on keybase.
* I have a public key whose fingerprint is 131D 6B20 28B1 4515 79FA EFA8 C7F9 7EE7 DD03 DB74
To claim this, I am signing this object:
substitutions:
dnsname: jeroentest
deviceid: jeroentest
devicename: Jeroen Test
esphome:
name: ${dnsname}
platform: ESP32
board: esp32dev
# Some custom options required for AZ Delivery board
require "httparty"
require 'yaml'
require 'digest/sha1'
require 'slop'
########################################################################################################################
# CLI Parsing
# $varname = global variable (dollar sign = global var, accessible in functions)
$opts = Slop.parse do |o|
o.string '-d', '--dest', 'destination', default: "_data/shares.yml"