Skip to content

Instantly share code, notes, and snippets.

View kchenery's full-sized avatar

Kent Chenery kchenery

View GitHub Profile
@kchenery
kchenery / maintplan_del
Last active August 29, 2015 14:09
Delete SQL Maintenance Plans
DECLARE @MaintPlanFolderGUID UNIQUEIDENTIFIER;
DECLARE @PackageName SYSNAME;
SELECT
@MaintPlanFolderGUID = folder.folderid
FROM
dbo.sysssispackagefolders AS folder
LEFT OUTER JOIN dbo.sysssispackagefolders AS parent
ON folder.parentfolderid = parent.folderid
WHERE
@kchenery
kchenery / raspberrydog.md
Last active January 26, 2020 07:58
Steps for setting up DataDog agent as a systemd service on a Raspberry PI

Install the requirements

sudo apt-get install sysstat

Install the agent from Datadog "from source". You'll get a command to run on the Pi that looks like this:

DD_API_KEY=0123456789abcdef0123456789abcdef sh -c "$(curl -L https://raw.githubusercontent.com/DataDog/dd-agent/master/packaging/datadog-agent/source/setup_agent.sh)"

Run that and wait for it to install and the agent to start running.

@kchenery
kchenery / init-vault.sh
Created December 15, 2022 09:47
Initialise Hashicorp Vault and capture keys
#!/usr/bin/bash
if [[ -z "${VAULT_ADDR}" ]]; then
echo "VAULT_ADDR is not defined"
fi
if [[ -z "${VAULT_KEY_COUNT}" ]]; then
VAULT_KEY_COUNT=5
fi