Skip to content

Instantly share code, notes, and snippets.

View benrowe's full-sized avatar
😀
building things!

Ben Rowe benrowe

😀
building things!
View GitHub Profile
@benrowe
benrowe / main.tf
Created May 25, 2025 22:47
Cloudflare tunnel & traefik setup via terraform
# main.tf
# Configure the Cloudflare provider
# Make sure to set CLOUDFLARE_API_TOKEN environment variable or configure it directly here.
# For security, using environment variables is recommended.
# export CLOUDFLARE_API_TOKEN="YOUR_CLOUDFLARE_API_TOKEN"
# export CLOUDFLARE_ACCOUNT_ID="YOUR_CLOUDFLARE_ACCOUNT_ID"
terraform {
required_providers {
cloudflare = {
@benrowe
benrowe / README.md
Created May 25, 2025 01:21
Hass Automation Scripts

Automation Scripts

Doorbell

dectects a unifi doorbell press and does the following

  1. stores the current speaker volume values for 2 speakers
  2. increases speaker volume to 80%
  3. plays a doorbell chime on both speakers
  4. tts "someone at door"
@benrowe
benrowe / init.lua
Created May 11, 2025 23:44
Hammerspoon config
-- Define the application name
local browserAppName = "Arc"
local terminalAppName = "Alacritty"
local ideAppName = "PhpStorm"
hs.hotkey.bind({}, "F13", function ()
hs.application.launchOrFocus(terminalAppName)
end)
hs.hotkey.bind({}, "F14", function ()
[
{
"name": "Corne v4",
"author": "Ben Rowe",
"switchMount": "cherry",
"switchBrand": "cherry",
"switchType": "MX3A-L1xx",
"plate": true,
"pcb": true
},
@benrowe
benrowe / README.md
Created November 7, 2023 05:04
Convert aws SSM params to .env file

Usage

./script.sh us-east-1 /my/param/prefix/ example.env

@benrowe
benrowe / HASS_SNIPPETS.md
Created August 21, 2023 02:54
A collection of snippets for HASS

Hass YAML snippets

@benrowe
benrowe / README.md
Created November 16, 2021 00:51
Find missing Foreign Key constraints

Find missing Foreign Key constraints in a MySQL database

This sql script can help identify FK columns in databases that are missing a constraint.

@benrowe
benrowe / README.md
Last active July 26, 2020 08:40
Run laravel tests with mysql

Run laravel tests efficiently with mysql

Injects a command into the phpunit bootstrap to seralise the migrated database state to an sql file.

Then on every test case, reset the database using the generated file.

Everytime phpunit runs, the test:bootstrap command is executed.

This will check for the existance of a sql file and if not, it creates a temporary database, migrates into the database and dumps the final migration to a sql file.

tap "eugenmayer/dockersync"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-drivers"
tap "homebrew/core"
tap "miderwong/flutter"
brew "[email protected]"
brew "asdf"
brew "aws-google-auth"
brew "aws-iam-authenticator"