Skip to content

Instantly share code, notes, and snippets.

View jsnfwlr's full-sized avatar
👨‍💻
Writing code for all the things.

Jason Fowler jsnfwlr

👨‍💻
Writing code for all the things.
View GitHub Profile
esphome:
name: garage
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret wifi
password: !secret wifi_pw
# Enable logging
@jsnfwlr
jsnfwlr / esphome_neopixel_clock_effect.yaml
Created August 30, 2021 21:48 — forked from markusressel/esphome_neopixel_clock_effect.yaml
ESPHome configuration example to create an animated clock using the Neopixel 60 LED ring
esphome:
# [...]
on_boot:
priority: -10
then:
# enable clock effect after boot
- light.turn_on:
id: light_ring
brightness: 100%
effect: Clock
import { LitElement, html } from 'https://unpkg.com/@polymer/lit-element@0.6.5/lit-element.js?module';
const styles = html`
<style>
:host {
display: flex;
flex: 1;
flex-direction: column;
}
ha-card {
@jsnfwlr
jsnfwlr / Vault-ssh-ca-README.md
Created February 20, 2020 01:52 — forked from kawsark/Vault-ssh-ca-README.md
A guide for configuring Vault's SSH-CA

SSH CA use-case with Vault

In this scenario we are going to set up Vault to sign SSH keys using an internal CA. We will configure the SSH secrets engine and create a CA within Vault. We will then configure an SSH server to trust the CA key we just created. Finally we will attempt to SSH using a private key, and a public key signed by Vault SSH CA.

Prerequisites

  • This guide assumes you have already provisioned a Vault server, SSH host using OpenSSH server, and a SSH client machine.
  • The client system must be able to reach the Vault server and the OpenSSH server.
  • We will refer to these systems respectively as:
  • VAULT_SERVER
@jsnfwlr
jsnfwlr / monit.rb
Created October 9, 2018 21:41 — forked from msaladna/monit.rb
Monit -> Pushover bridge
#!/usr/bin/ruby
require 'net/https'
re = Regexp.new('\bService\s*(?<svc>[^$]+)^$^\s*Date:\s*(?<date>.*?)$[\r\n]{1,2}
^\s*Action:\s*(?<action>.*?)$[\r\n]{1,2}
^\s*Host:\s*(?<host>(?<node>[^.]+).*?)$[\r\n]{1,2}
^\s*Description:\s*(?<desc>.*?)$', Regexp::MULTILINE|Regexp::EXTENDED)
# Take mail straight from STDIN