Skip to content

Instantly share code, notes, and snippets.

Avatar

Larry Smith Jr. mrlesmithjr

View GitHub Profile
View images.yml
---
base_images:
- name: centos7_x64
build: 7.6.1810
description: CentOS 7
os: Linux
os_disk_mb: 8192
specs:
controller: sata
hardware_compatibility: 10
View rollback_virtualbox.sh
#!/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 Dec 6, 2019
Launch Duplicati on macOS for user automatically. Save in ~/Library/LaunchAgents
View net.duplicati.tray-icon.plist
<?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 Apr 30, 2020
Duplicati backup exclude list for Linux, macOS, and Windows
View duplicati_excludes.txt
-[.*/.*/?packer_cache/]
-[.*\.DS_Store]
-[.*\.tmp]
-[/home/.*/.ansible_async/]
-[/home/.*/.ansible/]
-[/home/.*/.atom/]
-[/home/.*/.cache/]
-[/home/.*/.config/Duplicati/]
-[/home/.*/.cups/]
-[/home/.*/.docker/]
View mono_ssl_certs.sh
#!/usr/bin/env bash
curl -O https://curl.haxx.se/ca/cacert.pem && cert-sync --user cacert.pem && rm cacert.pem
View preseed.cfg
### 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 Dec 3, 2019
Packer Nested ESXi Builds
View ks.cfg
#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
View top10_repos.json
{
"top": {
"clones": {
"ansible-manage-lvm": {
"clones": 6347
},
"ansible-observium": {
"clones": 2952
},
"ansible-netplan": {
View rename_branches.py
#!/usr/bin/env python
import os
import subprocess
from git import Repo
working_dir = os.getcwd()
repo = Repo(working_dir)
origin_branches = list()
View merge-repos.py
#!/usr/bin/env python
import os
import subprocess
from git import Repo
working_dir = os.getcwd()
repo = Repo(working_dir)
origin_branches = list()