Navigation Menu

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 python
import os
import shutil
for root, dirs, files in os.walk(os.getcwd()):
if 'venv' in dirs:
print('Found venv in {0}'.format(root))
folder = os.path.join(root, 'venv')
shutil.rmtree(folder)
{
"atomKeymap.promptV3Features": true,
"cSpell.enabled": false,
"editor.fontFamily": "'Fira Code'",
"editor.fontLigatures": true,
"editor.fontSize": 18,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.renderIndentGuides": true,
#!/usr/bin/env bash
SERIAL_NUMBER="XXXX-yyyy-XXXX"
if [ ! -f $HOME/Downloads/vmware_workstation.sh ]; then
curl --progress-bar --proto-redir -all,https \
--max-redirs 1 --location \
--output $HOME/Downloads/vmware_workstation.sh \
--url https://www.vmware.com/go/getWorkstation-linux
fi
chmod +x $HOME/Downloads/vmware_workstation.sh
sudo $HOME/Downloads/vmware_workstation.sh --eulas-agreed \
#!/usr/bin/env bash
VBoxManage list vms | awk -F\" '{ print $3 }' | xargs -I vmid VBoxManage unregistervm --delete vmid
#!/usr/bin/env python
VBROWNBAG_CREW=dict()
VAR="vBrownBag"
LIST=['Ken', 'Chris', 'Graham']
for index, value in enumerate(LIST):
VBROWNBAG_CREW[value] = index
---
- hosts: localhost
gather_facts: false
connection: local
vars:
# Defines number of VMs to create
vm_count: 10
# Defines VM naming
vm_naming: vm
# Defines VM number to start with
[Unit]
After=dbus.service
Description=Service for virtual machines hosted on VMware
Documentation=http://open-vm-tools.sourceforge.net/about.php
ConditionVirtualization=vmware
DefaultDependencies=no
Before=cloud-init-local.service
[Service]
ExecStart=/usr/bin/vmtoolsd
INFO global: Vagrant version: 2.2.0
INFO global: Ruby version: 2.5.3
INFO global: RubyGems version: 2.7.7
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/gems/vagrant-2.2.0/bin/vagrant"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_DETECTED_OS="archlinux"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
#! /usr/bin/env python
import os
import datetime
import git
# Define files to commit when added or changed
FILES_TO_COMMIT = ['.gitignore']
# Define repo directory
REPO_DIR = os.getcwd()
# Define files/folders to add to .gitignore
# Self-elevate the script if required
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
$CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
Exit
}
}
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
refreshenv