Skip to content

Instantly share code, notes, and snippets.

@gmorse81
gmorse81 / values.yaml
Created January 22, 2024 05:14
ESPHome Helm Chart Config
#
# IMPORTANT NOTE
#
# This chart inherits from our common library chart. You can check the default values/options here:
# https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml
#
image:
# -- image repository
repository: ghcr.io/esphome/esphome
@gmorse81
gmorse81 / values.yaml
Created February 10, 2023 05:30
values.yaml example file for microk8s home assistant -
home-assistant:
env:
# -- Set the container timezone
TZ: "America/New York"
hostNetwork: true
ingress:
main:
enabled: true
annotations:
nginx.org/websocket-services: home-assistant
@gmorse81
gmorse81 / lk8s
Created April 23, 2022 14:40
Local kubernetes startup
#!/bin/sh
set -o errexit
up()
{
if ! docker ps > /dev/null 2>&1;
then
echo You need to install docker before running this tool
exit 1
fi
@gmorse81
gmorse81 / requestbody.json
Created March 14, 2022 04:33
Netlify deploy-succeeded function request body example - sensitive data removed
{
"payload": {
"id": "REDACTED",
"site_id": "REDACTED",
"build_id": "REDACTED",
"state": "ready",
"name": "REDACTED",
"url": "REDACTED",
"ssl_url": "REDACTED",
"admin_url": "REDACTED",
@gmorse81
gmorse81 / main.go
Created March 14, 2022 04:04
Netlify deploy-succeeded function written in go
package main
import (
"context"
"encoding/json"
"fmt"
"github.com/askcloudarchitech/mediumautopost/pkg/mediumautopost"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
@gmorse81
gmorse81 / release.yml
Created February 20, 2022 20:39
Github actions workflow to run goreleaser on tag push.
name: goreleaser
on:
push:
tags:
- "*"
permissions:
contents: write
@gmorse81
gmorse81 / .goreleaser.yml
Last active February 21, 2022 04:37
Sample .goreleaser file for publishing releases and to a homebrew tap
builds:
- binary: mediumautopost
goos:
- darwin
- linux
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
@gmorse81
gmorse81 / root.go
Last active February 20, 2022 18:21
go-cobra root file
package cmd
import (
"os"
mediumautopost "github.com/askcloudarchitech/medium-auto-post/pkg/mediumAutoPost"
"github.com/spf13/cobra"
)
var dotEnvPath string
@gmorse81
gmorse81 / main.go
Created February 19, 2022 06:05
basic go-cobra main.go file
package main
import "github.com/askcloudarchitech/medium-auto-post/cmd"
func main() {
cmd.Execute()
}
@gmorse81
gmorse81 / authprovider.go
Last active December 16, 2020 06:23
This is an example of how to use the helm v3 go client with a GCP GKE cluster without calling the gcloud CLI or providing a kube config file. This has been cobbled together from many other examples found around the interwebs
package main
import (
"context"
"fmt"
"log"
"net/http"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"