Skip to content

Instantly share code, notes, and snippets.

View ploegert's full-sized avatar
💭
¯\_(ツ)_/¯

Justin Ploegert ploegert

💭
¯\_(ツ)_/¯
View GitHub Profile
#!/usr/bin/env bash
set -euo pipefail
echo "== RHEL / VirtualBox Guest Additions setup =="
echo "Kernel: $(uname -r)"
echo
echo "== 1) Update packages (recommended to reduce kernel/module mismatch) =="
sudo dnf -y update || true
#!/bin/bash
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#=============================================================#
# Name: AAD/Intune Installer/Uninstaller script #
# Description: Installs or uninstalls necessary packages to #
# support CA access on Linux Desktop #
# USAGE: #
# chmod +x ./linux_cleaner.sh
#!/bin/bash
# Automate Charles Proxy SSL setup on Linux
CHARLES_CERT_URL="http://chls.pro/ssl"
CERT_NAME="charles-ssl-proxying-certificate.crt"
PROXY_PORT=8888
echo "Downloading Charles SSL certificate..."
wget -O $CERT_NAME $CHARLES_CERT_URL
# Install Curl
sudo apt install curl
# Install Microsoft's public key for production pacakges
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings
rm microsoft.gpg
# Install the production packages:
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/ubuntu/$(lsb_release -rs)/prod $(lsb_release -cs) main" >> /etc/apt/sources.list.d/microsoft-ubuntu-$(lsb_release -cs)-prod.list'
@ploegert
ploegert / install_ubuntu.sh
Last active September 15, 2025 19:04
install_ubuntu.sh
#!/bin/bash
# Install Curl
sudo apt install curl
# Install Microsoft's public key
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings
rm microsoft.gpg
#!/bin/bash
#=============================================================#
# Name: CertGenerator #
# Description: Create a self-signed SSL Certificates #
# Author: justin.j.ploegert@jci.com #
# USAGE: #
# chmod +x ./certGen.sh
#===================================================================
# To Generate certificate with specified password in a pfx
@ploegert
ploegert / send-statsd-test-metrics.sh
Created March 22, 2021 14:48 — forked from kirklewis/send-statsd-test-metrics.sh
Generate and send StatsD test metrics
#!/bin/bash
DEFAULT='\033[0m'
HI_CYAN='\033[0;96m'
HI_WHITE='\033[0;93m'
STATSD_HOST=127.0.0.1
STATSD_PORT=8125
api_names=(orders invoice user)
@ploegert
ploegert / Merge_Git-Repos.ps1
Last active August 12, 2021 18:24
Merge two Git Repos into destination repo
function Write-Log {
param([Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)][AllowEmptyString()][string]$Message)
Write-Verbose -Verbose ("[{0:s}] {1}`r`n" -f (get-date), $Message)
}
function Write-VLog {
param([Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)][AllowEmptyString()][string]$Message)
Write-Verbose ("[{0:s}] {1}`r`n" -f (get-date), $Message)
}
function Write-Info {
@ploegert
ploegert / git-clearHistory
Created July 28, 2020 18:43 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git