Skip to content

Instantly share code, notes, and snippets.

@johntdyer
johntdyer / actionable-notifications-subflow-for-ios.md
Created July 13, 2023 14:05 — forked from sstratoti/actionable-notifications-subflow-for-ios.md
iOS Subflow for HomeAssistant Companion notifications
@johntdyer
johntdyer / promtail-config.yaml
Created April 29, 2023 01:11
Promtail scrape config for PlexMedia Server
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
clients:
- url: http://192.168.100.8:3100/loki/api/v1/push
{
"meta" : {
"theme" : "stackoverflow"
},
"basics": {
"name": "John Dyer",
"label": "Manager of Platform Operations at Cisco",
"image": "https://gist.githubusercontent.com/johntdyer/b58cebbebfea59b3e718409d235ef85f/raw/8a8cdceceb88e879ab1e04d5de6ba8d071072971/Screen%2520Shot%25202021-05-21%2520at%25204.51.52%2520PM.png",
"email": "johntdyer@gmail.com",
"phone": "+1.407.474.0214",
@johntdyer
johntdyer / unifi-cloudkey.md
Created November 25, 2018 17:23
Unifi Cloudkey
title date draft categories tags thumbnail
Using Let's Encrypt Certificates with Unifi
2018-04-25
false
Security
unifi
lets-encrypt
ssl
/images/2018/04/lets-encrypt-logo.png

Let's Encrypt is a great service that automates deployment and renewal of SSL certificates, at a bargain price. For most situations where you have a regular OS, the default Certbot Acme client works well. However for more embedded solutions, like Ubiquiti's Unifi Cloudkey this is not an option as there is no full Linux OS. After researching a few of the alternative options, Acme Shell was the clear winner. It runs using the Bourne shell, and has Unifi support built in.

Keybase proof

I hereby claim:

  • I am johntdyer on github.
  • I am johntdyer (https://keybase.io/johntdyer) on keybase.
  • I have a public key ASC5X1rNrAiAXBWkpmH-ah3tgdCry5RpcZGHUf3d8SmFhQo

To claim this, I am signing this object:

@johntdyer
johntdyer / sendsqs.js
Last active August 2, 2022 13:12
AWS Lambda sample: Send received events to SQS as Message
// PUT YOUR AWS ACCOUNT NUMBER HERE
var AWS_ACCOUNT_ID= '12345';
// PUT YOUR SQS QUEUE NAME HERE
var AWS_SQS_QUEUE_NAME='catch-dlr-dyer-testing';
var QUEUE_URL = 'https://sqs.us-east-1.amazonaws.com/' + AWS_ACCOUNT_ID + '/' + AWS_SQS_QUEUE_NAME;
var AWS = require('aws-sdk');
var sqs = new AWS.SQS({region : 'us-east-1'});
require 'openssl'
# Module for encoding and decoding in Base32 per RFC 3548
module Base32
TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'.freeze
@table = TABLE
class <<self
attr_reader :table
end
package main
import (
"encoding/json"
. "github.com/smartystreets/goconvey/convey"
"os"
"testing"
)
func TestSpeechCalculatorSpec(t *testing.T) {
local dt = require "date_time"
local l = require 'lpeg'
local ip = require "ip_address"
local ip_address = l.Cg(l.Ct(l.Cg(ip.v4, "value") * l.Cg(l.Cc"ipv4", "representation")), "address")
l.locale(l)
local msg = {
Timestamp = nil,
type = nil,