Skip to content

Instantly share code, notes, and snippets.

Avatar
🍩
Running tf apply 💜

Ryan MacLean ryanmaclean

🍩
Running tf apply 💜
View GitHub Profile
View macos_portico.json
{
"name": "Portico",
"vendorProductId": 1414201352,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_GESC",
"KC_1",
"KC_2",
"KC_3",
@ryanmaclean
ryanmaclean / whiptailmenu.bash
Created May 7, 2021 — forked from wafsek/whiptailmenu.bash
A Example of whiptail menu with functions
View whiptailmenu.bash
#! /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 Apr 22, 2021
Chia Powershell Launch Script K32 10 Threads Separate Temp and Farm Drives
View chia_launch.ps1
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 Apr 11, 2021
Download All Turnkey Containers for Proxmox
View turnkey_ct_download.sh
#!/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 Apr 10, 2021 — 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
View Bash-or-PowerShell-with-Param.ps1
` # \
# 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 Mar 26, 2021
Microsoft Windows Active Directory and Log Source Datadog YAML
View conf.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 Mar 26, 2021
Active Directory Install Script for Server 2019
View ad_setup.ps1
$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 Mar 3, 2021 — forked from eribeiro/gource-ffmpeg.sh
Run Gource on a git repo and generate a 4k movie file movie.mp4
View gource-datadog.sh
#!/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 Dec 23, 2020
du top ten inodes and disk space
View du10.sh
#!/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
Volumio Datadog Agent Install ARM32 ARMHF
View volumio_datadog_armhf_install.sh
#!/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)