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
# This is not an ideal solution (currently) to export into production/development specific
# requirements.
# Capture current system time
CURRENT_TIME=$(date +"%Y.%m.%d-%H.%M.%S")
# Capture all Python packages currently installed
pip3 list --not-required --format freeze --exclude lockfile --exclude pip --exclude setuptools >"requirements.txt.${CURRENT_TIME}"
FROM {{ item.image }}
ENV container docker
{% if 'centos' in item.image %}
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
@mrlesmithjr
mrlesmithjr / parse.py
Created November 16, 2021 20:46
Bitwarden to 1Password conversion
#!/usr/bin/env python3
import json
import glob
from datetime import datetime
import csv
src = "./"
date = datetime.now()
#!/usr/bin/bash
ANSIBLE_VERSION=4.7.0
apt-get update
apt-get -y install build-essential curl fontconfig libbz2-dev libffi-dev \
libreadline-dev libsqlite3-dev libssl-dev python-is-python3 python3-dev \
python3-minimal python3-pip python3-setuptools python3-virtualenv \
python3-venv vim virtualenv zlib1g-dev zsh
#!/usr/bin/env python3
import json
import glob
from datetime import datetime
import csv
src = "./"
date = datetime.now()
#! /usr/bin/env bash
brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/c42237bb14f10c6ef7b997b780b584314d6f9c74/Casks/vmware-fusion.rb
#! /usr/bin/env bash
# Currently only works with Terraform versions up to 0.12.29
set -e
# Clone the repository
git clone https://github.com/Telmate/terraform-provider-proxmox
# Go Install the provider and provisioner (requires a working Golang installation)
cd terraform-provider-proxmox
@mrlesmithjr
mrlesmithjr / gist:72e23d0a0cceefef553b83b4fce5d06f
Created September 18, 2020 05:27
Example GitLab CI Pipeline using Terraform, etc.
---
# Most pre-req tooling, etc. is installed using jumphosts.yml playbook
variables:
ADMIN_EMAIL: mrlesmithjr@gmail.com
CLOUD_PROVIDER: Azure # Define Supported Cloud Provider (Azure)
GIT_CRYPT_ENABLED: "true" # Must be lowercase (true|false)
GIT_SUBMODULE_STRATEGY: recursive
ORGANIZATION: example_org
PROJECT_NAME: example_project
TERRAFORM_VERSION: 0.12.28
# Custom interfaces file for Packer builds using cloud-init
#!/usr/bin/env bash
set -e
DEST="Backblaze:$(hostname | awk -F. '{ print $1}')"
OPTS=("--delete-excluded" "--links" "--fast-list" "-v")
DIRS=("$HOME/Desktop" "$HOME/Documents" "$HOME/Git_Projects" "$HOME/Pictures"
"$HOME/.kube" "$HOME/.ssh")
EXCLUDE=("Applications/**" "Documents/Snagit/Autosaved Captures.localized/**"
"Documents/Virtual Machines.localized/**" "Downloads/**" "Dropbox/**"
"Google Drive/**" "Library/Caches/**" "Library/Containers/com.docker.docker/**"