Skip to content

Instantly share code, notes, and snippets.

View bandit145's full-sized avatar
💭
Angrily deleting config-drifted VMs

Philip Bove bandit145

💭
Angrily deleting config-drifted VMs
View GitHub Profile

Keybase proof

I hereby claim:

  • I am bandit145 on github.
  • I am bandit145 (https://keybase.io/bandit145) on keybase.
  • I have a public key whose fingerprint is 97B9 7A58 1062 F8EC 5E87 45B7 CAAD E87A 1E95 FFDB

To claim this, I am signing this object:

@bandit145
bandit145 / .sh
Created January 13, 2017 17:13
Manually remove a broken package
sudo mv /var/lib/dpkg/info/<package>.* /tmp/
sudo dpkg --remove --force-remove-reinstreq <package>

Keybase proof

I hereby claim:

  • I am bandit145 on github.
  • I am bandit145 (https://keybase.io/bandit145) on keybase.
  • I have a public key whose fingerprint is 9C04 3FE2 40FF FC1F FA05 F412 B07B 2DC9 7AD5 6349

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am bandit145 on github.
  • I am bandit145 (https://keybase.io/bandit145) on keybase.
  • I have a public key whose fingerprint is 41CB E6E3 C0FF B6F2 0867 C5E6 7ED4 7276 F441 265E

To claim this, I am signing this object:

@bandit145
bandit145 / test_hostrecord.py
Created December 15, 2017 16:14
example update_if_exists failure
from infoblox_client import objects, connector
import getpass
def main():
username = input('Username > ')
password = getpass.getpass('Password > ')
conn = connector.Connector({'host':'infoblox.example.com','username':username,'password':password,
'ssl_verify':False,'wapi_version':"1.7"})
@bandit145
bandit145 / System.py
Created March 15, 2018 22:50
Using a staticmethod to return instantiated versions of itself
class System:
names_from_api = ['server1','server2','server3']
def __init__(self, hostname):
self.hostname = hostname
@staticmethod
def get_systems(name):
system_list = []
for hostname in System.names_from_api:
@bandit145
bandit145 / convertto-jsonbroken.ps1
Last active April 15, 2018 22:06
ConvertTo-Json seems to be very broken and flattens nested arrays into strings
#PSVersion 5.1.14393.1770
$test = @{testarr=@(@{links=@(1,2)})}
$test
$test | ConvertTo-Json
$test | ConvertTo-Json | ConvertFrom-Json
@bandit145
bandit145 / Books.xml
Last active June 19, 2018 19:26
swapping powershell xml contexts between nodes
<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book category="cooking">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="children">
<title lang="en">Harry Potter</title>
@bandit145
bandit145 / centos7.json
Last active July 23, 2018 21:14
packer vmware-iso crash log
{
"builders":[
{
"type": "vmware-iso",
"iso_url": "https://mirrors.ocf.berkeley.edu/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1804.iso",
"iso_checksum_type": "sha256",
"guest_os_type":"rhel7_64Guest",
"network":"{{user `vm_network`}}",
"vm_name":"{{user `vm_name`}}",
@bandit145
bandit145 / gpg_loader.sh
Created October 6, 2018 05:44
gpg loader
if [[ ! $(top -b -n 1 | grep gpg-agent) = *"gpg-agent"* ]]; then
gpg-agent --daemon > .gpg-info
fi
source ~/.gpg-info