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 / 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 / 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 / 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 / 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 / create-win10-usb-on-mac.sh
Last active May 6, 2024 20:29 — 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 / netlify.sh
Last active May 5, 2019 00:38 — forked from lightdiscord/netlify.sh
Rust and wasm and netlify
#!/usr/bin/env bash
set -euf -o pipefail
cweb_version=0.6.16
curl -Lo cargo-web.gz https://github.com/koute/cargo-web/releases/download/${cweb_version}/cargo-web-x86_64-unknown-linux-gnu.gz
gunzip cargo-web.gz
chmod u+x cargo-web
binaryen_version=version_51
@ryanmaclean
ryanmaclean / tmux-cheatsheet.markdown
Last active July 29, 2021 16:36 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ryanmaclean
ryanmaclean / Script_Template.ps1
Created October 1, 2018 00:51 — forked from 9to5IT/Script_Template.ps1
PowerShell: Script Template
#requires -version 2
<#
.SYNOPSIS
<Overview of script>
.DESCRIPTION
<Brief description of script>
.PARAMETER <Parameter_Name>
<Brief description of parameter input required. Repeat this attribute if required>
@ryanmaclean
ryanmaclean / frigga.txt
Created September 24, 2018 16:46 — forked from johnrengelman/frigga.txt
Netflix Frigga Naming Schema
ASG name = frigga.group = app-stack-detail(-options)-push
frigga.cluster = app-stack-detail
frigga.push = v<sequence)
options:
- c0<value> = countries
- d0<value = devPhase
- h0<value> = hardware
@ryanmaclean
ryanmaclean / gist:e8e6096b652c3e23e4855e34dad0fa71
Created November 19, 2016 16:44 — forked from sgergely/gist:3793166
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name