Skip to content

Instantly share code, notes, and snippets.

View ryanmaclean's full-sized avatar
🍩
Running tf apply 💜

Ryan MacLean ryanmaclean

🍩
Running tf apply 💜
View GitHub Profile
@ryanmaclean
ryanmaclean / main.tf
Last active April 20, 2023 05:34
Vicuna-Generated Terraform AKS Cluster
View main.tf
provider "azurerm" {
version = "2.0"
}
resource "azurerm_resource_group" "example" {
name = "example-rg"
location = "westus2"
}
resource "azurerm_virtual_network" "example" {
@ryanmaclean
ryanmaclean / system-probe.yaml
Created November 15, 2022 19:05
Windows system-probe.yaml Network, Security Agent and File Integrity Monitoring Enabled
View system-probe.yaml
# From https://docs.datadoghq.com/network_monitoring/performance/setup/?tab=agentwindows
# File location: C:\ProgramData\Datadog\system-probe.yaml
##################################
## System Probe Configuration ##
##################################
## @param system_probe_config - custom object - optional
## Enter specific configurations for your System Probe data collection.
## Uncomment this parameter and the one below to enable them.
@ryanmaclean
ryanmaclean / dashboard_via_api.py
Created October 4, 2022 03:48 — forked from QuentinFra/dashboard_via_api.py
How to create a custom dashboard with the Datadog API
View dashboard_via_api.py
from dogapi import dog_http_api as api
##### Parameters #####
# Credentials
api.api_key = 'my_api_key'
api.application_key = 'my_application_key'
# Dashboard information
title = "Test Quentin via API"
@ryanmaclean
ryanmaclean / conf.yaml
Created September 2, 2022 07:02
IIS Datadog Configuration
View conf.yaml
## All options defined here are available to all instances.
#
init_config:
## @param use_localized_counters - boolean - optional - default: false
## Whether performance object and counter names should refer to their
## locale-specific versions rather than their English name.
#
# use_localized_counters: false
@ryanmaclean
ryanmaclean / gtd-windows.md
Last active September 2, 2022 06:50
Getting Things Done on Windows
View gtd-windows.md

Open a Powershell Admin shell by pressing Winkey+R, type “powershell” and hit ctrl+shift+enter to run as admin.

Run the follwing to install Chocolatey:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Then install some packages you'll want, using -y to confirm:

choco install -y google-chrome-x64 vscode conemu git github-desktp curl far powershell-core
@ryanmaclean
ryanmaclean / install_el_capitan_vm.md
Created May 31, 2022 17:35
Install El Capitan (macOS 10.11) VM - fix OSX could not be installed on you computer. No packages were eligible for install.
View install_el_capitan_vm.md

Error message when attempting install:

OSX could not be installed on you computer. No packages were eligible for install.

The problem - the certificates in the installer are out of date. In order to address this, we can change the date and time on the command line, but we will need to disable networking first.

In your virtualisation manager, disable the network interface connected to your VM.

Under "Utilities" in the top menu bar, choose "Command Line".

@ryanmaclean
ryanmaclean / install_mc_adm4.sh
Created January 10, 2022 03:06
Install Midnight Commander on Asus Lockerstor ADM 4.0
View install_mc_adm4.sh
#!/usr/bin/env sh
# Version of rpm shipped with ADM 4 doesn't do `rpm -ivh`
# Hacky, but working for now
# All packages from RPM find, el7 x86-64 versions, latest
# e.g.: https://www.rpmfind.net/linux/rpm2html/search.php?query=mc&submit=Search+...
# `wget https://www.rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/mc-4.8.7-11.el7.x86_64.rpm`
rpm -i gpm-libs-1.20.7-6.el7.x86_64.rpm
rpm -i libssh2-1.8.0-4.el7.x86_64.rpm
@ryanmaclean
ryanmaclean / datadog_on_nas.md
Last active May 11, 2023 12:52
Run Datadog As Container to Monitor NAS
View datadog_on_nas.md

Datadog on NASes

Monitoring your Synology or Asus ADM 4 NAS

Summary

Just a walkthrough of the containerized way to get NAS stats to Datadog.

The tl;dr is the container can monitor the host, processes, grab logs and SNMP. If you're using your NAS as a quick dev box you could also monitor other containers.

Synology DSM 6.X

@ryanmaclean
ryanmaclean / rocky-docker.sh
Created July 13, 2021 00:18
Install Docker on Rocky Linux
View rocky-docker.sh
#!/usr/bin/env bash
## Script to install docker-ce on Rocky Linux
## Run using `sudo rocky-docker.sh`
# Ensuring "GROUP" variable has not been set elsewhere
unset GROUP
echo "Removing podman and installing Docker CE"
dnf remove -y podman buildah
@ryanmaclean
ryanmaclean / macos_portico.json
Created May 28, 2021 06:59
Portico Mac Layout
View macos_portico.json
{
"name": "Portico",
"vendorProductId": 1414201352,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_GESC",
"KC_1",
"KC_2",
"KC_3",