Skip to content

Instantly share code, notes, and snippets.

View mrlesmithjr's full-sized avatar

Larry Smith Jr. mrlesmithjr

View GitHub Profile
#!/usr/bin/env bash
ls -ld /System/Library/Extensions/*Thunderbolt*
sudo mount -uw /
# if [ -d /System/Library/Extensions/AppleThunderboltDPAdapters.kext ]; then
# sudo mv /System/Library/Extensions/AppleThunderboltDPAdapters.kext /System/Library/Extensions/AppleThunderboltDPAdapters.kext.BAK
# fi
# if [ -d /System/Library/Extensions/AppleThunderboltEDMService.kext ]; then
# sudo mv /System/Library/Extensions/AppleThunderboltEDMService.kext /System/Library/Extensions/AppleThunderboltEDMService.kext.BAK
---
base_images:
- name: centos7_x64
build: 7.6.1810
description: CentOS 7
os: Linux
os_disk_mb: 8192
specs:
controller: sata
hardware_compatibility: 10
#!/usr/bin/env bash
brew cask uninstall virtualbox virtualbox-extension-pack
brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/45d768ed9fa4a23cc76fab675cdcd6bf409ab32e/Casks/virtualbox.rb
brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/45d768ed9fa4a23cc76fab675cdcd6bf409ab32e/Casks/virtualbox-extension-pack.rb
@mrlesmithjr
mrlesmithjr / net.duplicati.tray-icon.plist
Last active December 6, 2019 04:26
Launch Duplicati on macOS for user automatically. Save in ~/Library/LaunchAgents
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.duplicati.tray-icon</string>
<key>ProgramArguments</key>
<array>
<string>open</string>
<string>/Applications/Duplicati.app/</string>
@mrlesmithjr
mrlesmithjr / duplicati_excludes.txt
Last active April 3, 2024 18:28
Duplicati backup exclude list for Linux, macOS, and Windows
-[.*/.*/?packer_cache/]
-[.*\.DS_Store]
-[.*\.tmp]
-[/home/.*/.ansible_async/]
-[/home/.*/.ansible/]
-[/home/.*/.atom/]
-[/home/.*/.cache/]
-[/home/.*/.config/Duplicati/]
-[/home/.*/.cups/]
-[/home/.*/.docker/]
#!/usr/bin/env bash
curl -O https://curl.haxx.se/ca/cacert.pem && cert-sync --user cacert.pem && rm cacert.pem
### Late commands
ubiquity ubiquity/success_command string cp /target/etc/rc.local /target/etc/rc.local.orig; \
nic=$(nmcli d | grep -v lo | awk 'NR>1 { print $1 }'); \
echo "#!/bin/bash" > /target/etc/rc.local; \
echo "connected=\$(nmcli d | grep $nic | awk '{print \$3}')" >> /target/etc/rc.local; \
echo "while [ \"\${connected}\" != 'connected' ]; do" >> /target/etc/rc.local; \
echo "sleep 2" >> /target/etc/rc.local; \
echo "connected=\$(nmcli d | grep $nic | awk '{print \$3}')" >> /target/etc/rc.local; \
echo "done" >> /target/etc/rc.local; \
echo "sleep 2m" >> /target/etc/rc.local; \
@mrlesmithjr
mrlesmithjr / ks.cfg
Created December 3, 2019 18:08
Packer Nested ESXi Builds
#Accept the VMware End User License Agreement
vmaccepteula
# clear paritions and install
clearpart --firstdisk --overwritevmfs
install --firstdisk --overwritevmfs --novmfsondisk
#set the root password
rootpw VMw@re1
{
"top": {
"clones": {
"ansible-manage-lvm": {
"clones": 6347
},
"ansible-observium": {
"clones": 2952
},
"ansible-netplan": {
#!/usr/bin/env python
import os
import subprocess
from git import Repo
working_dir = os.getcwd()
repo = Repo(working_dir)
origin_branches = list()