Skip to content

Instantly share code, notes, and snippets.

View bdimcheff's full-sized avatar

Brandon Dimcheff bdimcheff

View GitHub Profile
@lucasefe
lucasefe / watchr-runner.rb
Created July 29, 2010 14:55 — forked from rud/watchr-runner.rb
watchr for rails3
if __FILE__ == $0
puts "Run with: watchr #{__FILE__}. \n\nRequired gems: watchr rev"
exit 1
end
# --------------------------------------------------
# Convenience Methods
# --------------------------------------------------
def run(cmd)
puts(cmd)
@igrigorik
igrigorik / ruby-1.9-tips.rb
Created February 3, 2011 17:19
Ruby 1.9 features, tips & tricks you may not know about...
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"
@AlinaNova21
AlinaNova21 / README.md
Last active June 22, 2021 21:01
Rancher 2.0, RKE, and some Raspberry Pi 3s

Kubernetes and Arm

Getting rke and Rancher setup to run kubernetes on arm is interesting. There is no official support yet via rancher, although there is interest and some work done towards those efforts. This is my attempt at getting a cluster of 3 Pis (2 3Bs and 1 3B+) provisioned and registered to a rancher 2 server.

Prep

I've successfully completed this both with Hypriot OS 1.9.0 and the arm64 builds https://github.com/DieterReuter/image-builder-rpi64 Both times I used the same basic cloud-init setup

@brandond
brandond / mirror-image.sh
Last active May 11, 2021 14:44
Ignorant hack of a script to mirror multiarch images on Docker Hub. Requires docker and jq.
#!/bin/bash
FLAGS=""
SOURCE="docker.io/library"
DEST="docker.io/brandond"
IMAGE="busybox"
TAG="1.32.0-uclibc"
docker buildx imagetools inspect ${SOURCE}/${IMAGE}:${TAG} --raw | \
jq -r '.manifests[] | (.digest + " " + .platform.architecture)' | \
@georgeh
georgeh / configuration.yaml
Last active May 22, 2022 02:07
DTE Insight Home Assistant configuration
sensor:
# Read in DTE Insight via MQTT. You can add an MQTT integration in Home Assistant with the DTE Insight's IP address on port 2883
- platform: mqtt # this is my DTE Insight, if you have multiple MQTT servers this might be different
name: Instant Energy Usage
state_topic: "event/metering/instantaneous_demand"
unit_of_measurement: W
value_template: "{{ value_json.demand }}"
state_class: measurement
device_class: energy