Skip to content

Instantly share code, notes, and snippets.

View richardstrnad's full-sized avatar
💭
💻 Coding

Richard Strnad richardstrnad

💭
💻 Coding
View GitHub Profile
{
"monFabricPol": {
"attributes": {
"dn": "uni/fabric/monfab-default"
},
"children": [
{
"monFabricTarget": {
"attributes": {
"scope": "dbgAcPath"
@richardstrnad
richardstrnad / ISOLINUX.CFG
Last active December 16, 2020 07:50
Custom ISOLINUX.CFG for unattended Hyperflex installation
DEFAULT vesamenu.c32
TIMEOUT 50
TOTALTIMEOUT 100
MENU TITLE Unattended HyperFlex ESXi Installer - 6.7 U3 (Build 16316930)
MENU RESOLUTION 800 600
MENU BACKGROUND /back.png
MENU PASSPROMPT DO NOT USE FOR UPGRADE. THIS WILL DESTROY THE NODE. Enter ERASE (all CAPS) and hit ENTER.
menu color sel 7;37;40 #c00090f0 #ffffffff all
menu color pwdheader 31;47 #ffffffff #20ffffff std
MENU HELPMSGROW 15
@richardstrnad
richardstrnad / app.py
Last active December 2, 2020 07:38
Simple Logging Setup for Python3, requires pyyaml
import logging
import logging.config
import module
import yaml
logging_config = 'logging.conf'
with open(logging_config) as fp:
config = yaml.safe_load(fp)
logging.config.dictConfig(config)
@richardstrnad
richardstrnad / reset_routing_table.sh
Last active January 14, 2020 07:47 — forked from midwire/reset_routing_table.sh
Reset routing table on OSX
#!/usr/bin/env bash
# Reset routing table on OSX
# display current routing table
echo "********** BEFORE ****************************************"
netstat -rn
echo "**********************************************************"
for i in {0..4}; do
sudo route -n flush # several times

Keybase proof

I hereby claim:

  • I am richardstrnad on github.
  • I am richy (https://keybase.io/richy) on keybase.
  • I have a public key ASBsLXu634uLt5cAQhocU9cSiSlZwEIAP1pYyTXubNKnego

To claim this, I am signing this object:

def get_mask(ip1, ip2):
mask = []
ip1_split = ip1.split('.')
ip1_split[-1] = str(int(ip1_split[-1]) - 1)
ip2_split = ip2.split('.')
ip2_split[-1] = str(int(ip2_split[-1]) + 1)
for i, j in zip(ip1_split, ip2_split):
mask.append(str(255 - (int(j) - int(i))))
return '.'.join(mask)