Skip to content

Instantly share code, notes, and snippets.

View opsroller's full-sized avatar
🎯
Focusing

Charles Gardner opsroller

🎯
Focusing
View GitHub Profile
@opsroller
opsroller / bio_unpack.py
Created December 25, 2018 00:15 — forked from XVilka/bio_unpack.py
Unpacks *.BIO and *.CAP EFI capsule files
#!/bin/env python
import ctypes
import struct
import sys
import os
import array
EFI_CAPSULE_GUID = "BD86663B760D3040B70EB5519E2FC5A0".decode('hex') # 3B6686BD-0D76-4030-B70E-B5519E2FC5A0
EFI2_CAPSULE_GUID = "8BA63C4A2377FB48803D578CC1FEC44D".decode('hex') # 4A3CA68B-7723-48FB-803D-578CC1FEC44D
UEFI_CAPSULE_GUID = "B9829153B5AB9143B69AE3A943F72FCC".decode('hex') # 539182B9-ABB5-4391-B69A-E3A943F72FCC
@opsroller
opsroller / lxd.py
Created March 16, 2018 06:02 — forked from haarcuba/lxd.py
ansible inventory module that lists lxd containers
#!/usr/bin/env python3
import sys
import subprocess
import re
def containers():
lxcOutput = subprocess.check_output( ['lxc', 'list' ] )
ips = re.compile( '\d+\.\d+\.\d+\.\d+' ).findall( str( lxcOutput ) )
nodes = dict( hosts = ips, vars = { "ansible_user": "root" } )
inventory = dict( nodes = nodes )
@opsroller
opsroller / wget-jdk-oracle-install-example.txt
Created July 15, 2016 01:57 — forked from sr75/wget-jdk-oracle-install-example.txt
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu