Skip to content

Instantly share code, notes, and snippets.

View ryanmaclean's full-sized avatar
Harnessing GenAI 💜

Ryan MacLean ryanmaclean

Harnessing GenAI 💜
View GitHub Profile
@ryanmaclean
ryanmaclean / conf.yaml
Created March 26, 2021 05:15
Microsoft Windows Active Directory and Log Source Datadog YAML
## All options defined here are available to all instances.
#
init_config:
## @param service - string - optional
## Attach the tag `service:<SERVICE>` to every metric, event, and service check emitted by this integration.
##
## Additionally, this sets the default `service` for every log source.
#
# service: <SERVICE>
@ryanmaclean
ryanmaclean / ad_setup.ps1
Created March 26, 2021 04:26
Active Directory Install Script for Server 2019
$DSRMPass = ConvertTo-SecureString -String "CHANGEME" -AsPlainText -Force
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode 7 `
-ForestMode 7 `
-DomainName "lab.local" `
-InstallDns:$true `
-SafeModeAdministratorPassword $DSRMPass `
@ryanmaclean
ryanmaclean / gource-datadog.sh
Last active March 3, 2021 20:59 — forked from eribeiro/gource-ffmpeg.sh
Run Gource on a git repo and generate a 4k movie file movie.mp4
#!/usr/bin/env bash
# Requirements:
# brew install gource libav ffmpeg
# Feel free to play around with these to test!
FILENAME="output" # mp4 extension is currently hardcoded
TITLE="Datadog Agent" # This title goes bottom left
FRAMERATE="25" # Pick 25, 30, 60
RESOLUTION="3840x2160" # Examples: 1920x1080, 3840x2160, 1280×720
@ryanmaclean
ryanmaclean / du10.sh
Created December 23, 2020 06:10
du top ten inodes and disk space
#!/usr/bin/env bash
set -euox pipefail
# Disk utilization for files and inodes
# to use:
# `./du10.sh`
# Top ten inodes, queue depth 1
du -ad 1 --inodes . | sort -rn | head -10
@ryanmaclean
ryanmaclean / volumio_datadog_armhf_install.sh
Last active May 3, 2021 22:14
Volumio Datadog Agent Install ARM32 ARMHF
#!/usr/bin/env bash
# Add Fonz's Repo - steps to follow for your own recompile:
# https://www.fonz.net/blog/archives/2020/06/19/datadog-v7-on-raspberry-pi2/
echo 'deb http://apt.fonz.net datadog-arm main' >> /etc/apt/sources.list
# Run an apt update to grab the newly added source
apt update
# Add the cert key, this would apply to your in-house repo (ID AT THE END WILL BE DIFFERENT)
@ryanmaclean
ryanmaclean / create-win10-usb-on-mac.sh
Last active February 20, 2026 10:58 — forked from bmatcuk/create-usb.sh
Create a Bootable UEFI Windows USB stick from an ISO on Apple macOS
# Just a quick update for GPT and to use `rsync` instead of `cp`!
# That means this applies to UEFI boot, though for legacy BIOD boot, feel free to swap
# GPT to MBR below.
# Requires https://homebrew.sh to split the install.wim file
brew install wimlib
# First, we need to find our device. BEFORE inserting your USB drive, run the
# following:
diskutil list
@ryanmaclean
ryanmaclean / stream_deck_linux_ubuntu_studio.md
Last active August 9, 2020 06:10
Linux Stream Deck XFCE

Stream Deck Config for Ubuntu Studio 20.04

Note: uses XFCE as the desktop manager

Requires streamdeck and streamdeck-ui Python packages to be installed. May require xhost + in order to config the first time.

Some icons from Nerd or Die (free) and Eva (open source), note that these are all fairly specific at the moment and will definitely be changing. In particular, the screenshots are just me adding placeholders.

#########################
## Basic Configuration ##
#########################
## @param api_key - string - required
## The Datadog API key to associate your Agent's data with your organization.
## Create a new API key here: https://app.datadoghq.com/account/settings
#
api_key: XXXXX
@ryanmaclean
ryanmaclean / bionic_ova_pubkey_add.sh
Created March 9, 2020 18:35
Ubuntu Bionic OVA Customization
#! /usr/bin/env bash
set -euo pipefail
VMDK_SHA=$(sha256sum ubuntu-bionic-18.04-cloudimg.vmdk | awk '{print $1}')
OVF_SHA=$(sha256sum ubuntu-bionic-18.04-cloudimg.ovf | awk '{print $1}')
KEY=$(cat ~/.id_rsa.pub)
# OVA Extract
cd
@ryanmaclean
ryanmaclean / Mojave_post_install.md
Last active August 10, 2019 20:32
Mojave Post-Install Minimum Steps

Start by opening the terminal to get some of this started

  • Open Terminal: cmd+space, type “t”, enter

Turn off natural scrolling

We'll turn off natrual scrolling and quickly reboot in order to resume the rest of the steps.

defaults write -g com.apple.swipescrolldirection -bool NO
sudo reboot