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 / macos_portico.json
Created May 28, 2021 06:59
Portico Mac Layout
{
"name": "Portico",
"vendorProductId": 1414201352,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_GESC",
"KC_1",
"KC_2",
"KC_3",
@ryanmaclean
ryanmaclean / whiptailmenu.bash
Created May 7, 2021 02:09 — forked from wafsek/whiptailmenu.bash
A Example of whiptail menu with functions
#! /bin/bash
# This program is just an example of how to make a whiptail menu and some basic commands.
# Copyright (C) 2016 Baljit Singh Sarai
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License.
@ryanmaclean
ryanmaclean / chia_launch.ps1
Created April 22, 2021 16:34
Chia Powershell Launch Script K32 10 Threads Separate Temp and Farm Drives
cd $env:LOCALAPPDATA\chia-blockchain\app-1.1.0\resources\app.asar.unpacked\daemon
chia plots create -k 32 -n 10 -b 8000 -r 8 -t T:\ -d F:\
PAUSE
@ryanmaclean
ryanmaclean / turnkey_ct_download.sh
Created April 11, 2021 04:41
Download All Turnkey Containers for Proxmox
#!/usr/bin/env bash
# Used for lab - download all the Turnkey containers locally
# If you want the system containers, system is the section you want!
STORAGE="local" # Find here: https://proxmox:8006/#v1:0:=type%2Fstorage:4:=jsconsole::::7:=consolejs:
SECTION="turnkeylinux" # Can also use "system"
# Find all containers for the section and download them to defined storage
# The awk statement here grabs the second column (container name) from the pveadm
@ryanmaclean
ryanmaclean / Bash-or-PowerShell-with-Param.ps1
Last active August 14, 2023 05:50 — forked from chrisfcarroll/Bash-or-PowerShell-with-Param.ps1
Hold both bash and PowerShell code in a single script file and/or make a PowerShell.ps1 script executable on all platforms. For Windows, *nix, linux and macOS. See Comments below
` # \
# PowerShell Param statement : every line must end in #\ except the last line must with <#\
# And, you can't use backticks in this section #\
param( [ValidateSet('A','B')]$tabCompletionWorksHere, #\
[switch]$andHere #\
) <#\
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# Bash Start ------------------------------------------------------------
@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)