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 / disable_click_to_show_desktop.sh
Last active March 5, 2024 04:27
MacOS Sonoma Turn Off or Disable Click Wallpaper to Reveal Desktop Unless in Stage Manager
#!/usr/bin/env bash
set -euox
##
# Disable click to show desktop
# run with `bash disable_click_to_show_desktop.sh`
# or `chmod +x disable_click_to_show_desktop.sh && ./$_`
# `defaults` is pretty handy! https://ss64.com/mac/defaults.html
##
@ryanmaclean
ryanmaclean / main.tf
Last active April 20, 2023 05:34
Vicuna-Generated Terraform AKS Cluster
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
# 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
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
## 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

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.

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
#!/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

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
#!/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