Skip to content

Instantly share code, notes, and snippets.

@dwardu89
dwardu89 / gist:17eae93524853f8553ac2d56bcb39200
Created January 31, 2023 16:08
LinkedIn Post for Testing Toolkits
Copy/Paste from a LinkedIn Post
GitHub is a Goldmine but 95% of testers don't use it enough.
These 10 GitHub repositories will help you become a better tester:
1. How They Test
🔸Curated collection of publicly available resources on how software companies test their software systems.
🔸All the resources mentioned here are publicly available resources.
@dwardu89
dwardu89 / get-entities-with-updates-available-in-hass.yaml
Last active December 28, 2022 22:01
Home assistant blueprint to get entities with updates
blueprint:
name: Update detection & notification for all update sensors
description: Regularly test all sensors with 'update' device-class for having an update set to 'on'.
domain: automation
input:
time:
name: Time to test on
description: Test is run at configured time
default: '10:00:00'
selector:
@dwardu89
dwardu89 / hive_trv_load_balancing_blueprint.yaml
Created November 6, 2022 21:20
Hive TRV Load Balancing Home Assistant Blueprint
blueprint:
domain: automation
name: Hive TRV Room Load Balancing
description: >
Calculate and send room mean load every 15min to
load balance TRVs in the same room, via zigbee2mqtt.
Uses Danfoss recommended calculation (Hive TRV is based off Danfoss).
input:
hive_trv_devices:
name: Hive TRV Device
@dwardu89
dwardu89 / README.md
Created August 25, 2020 09:26 — forked from xandout/README.md
Kubernetes DaemonSet that enables a direct shell on each Node using SSH to localhost

Getting a shell on each node

I run several K8S cluster on EKS and by default do not setup inbound SSH to the nodes. Sometimes I need to get into each node to check things or run a one-off tool.

Rather than update my terraform, rebuild the launch templates and redeploy brand new nodes, I decided to use kubernetes to access each node directly.

Alternative option

https://github.com/alexei-led/nsenter

@dwardu89
dwardu89 / code-export-extensions.sh
Created February 25, 2020 09:32
Export a list of Visual Studio Code Extensions
#!/usr/bin/env bash
code --list-extensions | awk '{print "code --install-extension " $1}'
@dwardu89
dwardu89 / s3.tf
Created June 11, 2018 14:01 — forked from onnimonni/s3.tf
s3 replicated bucket with terraform
# Create all variables used in this Terraform run
variable "aws_access_key" {}
variable "aws_access_secret_key" {}
variable "aws_bucket_name" {}
variable "aws_region_main" {
default = "eu-west-1"
}
variable "aws_region_replica" {
default = "eu-central-1"
}
@dwardu89
dwardu89 / createStorageTransferServiceJob.go
Created June 9, 2018 17:13
Creates a Storage Transfer Service request to sync objects form a Google Cloud Bucket to another Google Cloud Bucket
package main
import (
"golang.org/x/oauth2/google"
"google.golang.org/api/storagetransfer/v1"
"fmt"
"log"
"golang.org/x/net/context"
@dwardu89
dwardu89 / generate_random_password.sh
Created April 4, 2018 09:29
Generates a random password
#!/usr/bin/env bash
RANDOM_PASSWORD=$(date +%s | sha256sum | base64 | head -c 32 ; echo)
echo $RANDOM_PASSWORD
@dwardu89
dwardu89 / aws_s3_purge_versions.sh
Created February 14, 2018 10:22
Purging all the versions of objects from an AWS S3 bucket.
#!/bin/bash
# This script assumes that your aws cli is able to connect to the bucket you want to purge
bucket=$1
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`