Skip to content

Instantly share code, notes, and snippets.

@hobayoba
hobayoba / certificate_synthetic.js
Last active June 7, 2022 17:03 — forked from adamcrews/certificate_synthetic.js
New Relic SSL/TLS Synthetic
/*
To use this synthetic, set the following Secure credentials under the Synthetic tab:
NEW_RELIC_INSIGHTS_API_KEY - Your api key for Newrelic Insights from the Insights Api Keys.
NEW_RELIC_INSIGHTS_URL - Your URL for Newrelic Insights events from the Insights Api Keys.
CERTS_TO_MONITOR - A list of hosts to check via https, separated by a comma and a space, for example:
host.example.com, foo.example.com
Create a new Synthetic monitor (browser script), copy the entire contents of this script to the monitor.
Set the monitor to run once a day from a single location.
@hobayoba
hobayoba / cloudwatch.tf
Created October 28, 2020 13:48 — forked from picadoh/cloudwatch.tf
EC2 Instance Scheduling (Stop/Start) with Terraform
### Cloudwatch Events ###
# Event rule: Runs at 8pm during working days
resource "aws_cloudwatch_event_rule" "start_instances_event_rule" {
name = "start_instances_event_rule"
description = "Starts stopped EC2 instances"
schedule_expression = "cron(0 8 ? * MON-FRI *)"
depends_on = ["aws_lambda_function.ec2_start_scheduler_lambda"]
}
# Runs at 8am during working days
@hobayoba
hobayoba / Unifi_keystore
Last active August 27, 2019 15:26 — forked from dlangille/commands
Importing your own cert into a Unifi controller
# All of this was run on FreeBSD 11, but with path adjustments to the keystore, should work for any OS.
# Your cert is in your local directory:
#
# unifi01.int.unixathome.org.key
# unifi01.int.unixathome.org.pem
# aircontrolenterprise is the password we are using on our pkcs12 file
# crete the keys.p12 file