Skip to content

Instantly share code, notes, and snippets.

smitmartijn /
Created Dec 27, 2021
More complete font awesome v4 to v5 migration
import os
from collections import OrderedDict
findreplace = [
('fa fa-500px', 'fab fa-500px'),
('fa fa-address-book-o', 'far fa-address-book'),
('fa fa-address-card-o', 'far fa-address-card'),
('fa fa-adn', 'fab fa-adn'),
('fa fa-amazon', 'fab fa-amazon'),
('fa fa-android', 'fab fa-android'),
smitmartijn /
Created Nov 8, 2021
vRealize Automation Action that reconfigures server after deployment
# This script can be used as an action inside vRealize Automation to handle
# logging into deployed servers after deployment.
# It's provided as-is. If you'd like to use it, there are multiple changes needed.
# I.e. vraUrl to point to your own vRA. The username that's used to SSH. The way it decides
# which servers to log into.
# Martijn Smit <>
smitmartijn /
Created Mar 21, 2021 — forked from goodjob1114/
how to modify .ova file on linux/Mac using terminal....export vm (OVF 1.0) from virtualbox, then modify some tag and hash value for import vm to ESXi

extract ova files from an archive

$ tar -xvf vmName.ova

modify ovf for some invalid tag

$ vi vmName.ovf
View vrni-6.0-backup.json
"data_filter": {
"snmp": true,
"smtp": true,
"data_sources": true,
"events": true,
"syslog": true,
"ldap": true,
"vidm": true,
"user_data": true,
View .devcontainer for NSX-T AsBuiltReport
"name": "AsBuiltReport.VMware.NSX-T Development Container",
"dockerFile": "Dockerfile",
"postCreateCommand": "pwsh",
"extensions": [
View Zoom Macros.kmmacros
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
# this script randomly scales 1 deployment per namespace per cluster (for demo purposes)
# 2019 Martijn Smit <>
cluster_list=("k8s-cluster-1" "k8s-cluster-2")
for cluster in "${cluster_list[@]}"
View pks-cleanup-nsxt.ps1
# Edit this
$NSXT_Manager = "your-nsxt-manager-hostname-or-ip"
$NSXT_Username = "admin"
$NSXT_Password = 'mypassword'
# Stop editing
function Invoke-NSXTRestMethod
param (
[Parameter (Mandatory=$true)]
import init_api_client
import swagger_client
from import ApiException
# Initialize SDK and parse the args for connection details
args = init_api_client.parse_arguments()
api_client = init_api_client.get_api_client(args)
# Create search API client object
search_api = swagger_client.SearchApi()
import swagger_client
from import ApiException
api_client = swagger_client.ApiClient(host="https://{}/api/ni".format("my-vrni-platform-fdqn-or-ip"))
user_creds = swagger_client.UserCredential(username="admin@local", password="VMware1!", domain=dict(domain_type="LOCAL"))
auth_api = swagger_client.AuthenticationApi(api_client=api_client)
auth_token = auth_api.create(user_creds)