Skip to content

Instantly share code, notes, and snippets.

Avatar

Larry Smith Jr. mrlesmithjr

View GitHub Profile
View Dockerfile.j2
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 Nov 16, 2021
Bitwarden to 1Password conversion
View parse.py
#!/usr/bin/env python3
import json
import glob
from datetime import datetime
import csv
src = "./"
date = datetime.now()
View bootstrap.sh
#!/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
View parse.py
#!/usr/bin/env python3
import json
import glob
from datetime import datetime
import csv
src = "./"
date = datetime.now()
View vmware_fusion_11.sh
#! /usr/bin/env bash
brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/c42237bb14f10c6ef7b997b780b584314d6f9c74/Casks/vmware-fusion.rb
View install_tf_proxmox_provider.sh
#! /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 Sep 18, 2020
Example GitLab CI Pipeline using Terraform, etc.
View gist:72e23d0a0cceefef553b83b4fce5d06f
---
# 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
View interfaces
# Custom interfaces file for Packer builds using cloud-init
View backup.sh
#!/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/**"
View environment.yml
---
# Global provisioners will run against every node in the order specified.
# These provisioners run after all node specific provisioners if defined.
#
# For node specific provisioners add at the node level
provisioners: []
# - type: shell
# inline: |
# if [ -f /etc/os-release ]; then
# os_name="$(awk -F= '/^NAME/{ print $2 }' /etc/os-release | sed 's/"//g')"