Skip to content

Instantly share code, notes, and snippets.

View lamw's full-sized avatar

William Lam lamw

View GitHub Profile
@lamw
lamw / gist:4e3206fc8e13c3280a0074c9f50498d3
Created April 23, 2021 17:31
ingressroute-gateway-modified.yaml
---
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
annotations:
kubernetes.io/ingress.class: contour-external
labels:
app: vmware
name: event-router
namespace: vmware-system
@lamw
lamw / gist:cd9881727237148e8d5bb8f8435b4c2e
Created February 1, 2021 16:38
Fix vSphere UI downloading plugin-in: com.vmware.h4.vsphere.client
SERVICE_IDS=$(/usr/lib/vmware-lookupsvc/tools/lstool.py list --ep-type com.vmware.cis.vsphereclient.plugin --url http://localhost:7090/lookupservice/sdk --type vsphere.client --id-only | grep -v JAVA)
VC_USERNAME='administrator@vsphere.local'
VC_PASSWORD='VMware1!'
for SERVICE_ID in ${SERVICE_IDS[@]};
do
/usr/lib/vmware-lookupsvc/tools/lstool.py unregister --url http://localhost:7090/lookupservice/sdk --user ${VC_USERNAME} --password "${VC_PASSWORD}" --id ${SERVICE_ID} --no-check-cert
done
vmon-cli -r vsphere-ui
@lamw
lamw / gist:7069bc74e020485d0de8c43a0ff8f67f
Created November 19, 2020 20:02
Automated installation of VMware Harbor Registry on Photon OS
DOCKER_COMPOSE_VERSION=1.27.4
HARBOR_VERSION=1.10.6
DEFAULT_HARBOR_PASSWORD='Tanzu1!'
HARBOR_HOSTNAME=registry.tanzu.local
systemctl enable docker
systemctl start docker
curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
@lamw
lamw / gist:a9ab09834a806505fd02415ed2b85131
Created June 23, 2020 16:19
VMC Terraform Provider for deploying 1 & 2 Node SDDC
# 1-Node SDDC
provider "vmc" {
refresh_token = var.refresh_token
org_id = var.org_id
}
resource "vmc_sddc" "sddc_1" {
sddc_name = "1-Node-SDDC"
num_host = 1
@lamw
lamw / gist:27818554a29a1f4db164d432a691bf77
Last active June 23, 2020 16:19
VMC REST API for deploying 1 & 2 Node SDDC
# 1-Node SDDC
POST /orgs/{orgs}/sddcs
{
"name": "1-Node-SDDC",
"num_hosts": 1,
"deployment_type": "SingleAZ",
"sddc_type": "1NODE",
"provider": "AWS",
@lamw
lamw / gist:4769a59dabaa41f789950aaa1c7fab2b
Created May 8, 2020 15:46
tf-debug-ovf-local-deploy
2020/05/08 08:43:05 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/05/08 08:43:05 [INFO] Terraform version: 0.12.24
2020/05/08 08:43:05 [INFO] Go runtime version: go1.12.13
2020/05/08 08:43:05 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply", "-auto-approve"}
2020/05/08 08:43:05 [DEBUG] Attempting to open CLI config file: /Users/lamw/.terraformrc
2020/05/08 08:43:05 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/05/08 08:43:05 [INFO] CLI command args: []string{"apply", "-auto-approve"}
2020/05/08 08:43:05 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
@lamw
lamw / gist:1682db3c1460f4c3838d6a11fe98584b
Created May 8, 2020 15:30
tf-debug-ovf-remote-url-deploy
2020/05/08 08:30:04 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/05/08 08:30:04 [INFO] Terraform version: 0.12.24
2020/05/08 08:30:04 [INFO] Go runtime version: go1.12.13
2020/05/08 08:30:04 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply", "-auto-approve"}
2020/05/08 08:30:04 [DEBUG] Attempting to open CLI config file: /Users/lamw/.terraformrc
2020/05/08 08:30:04 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/05/08 08:30:04 [INFO] CLI command args: []string{"apply", "-auto-approve"}
2020/05/08 08:30:04 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
{
"variables": {
"photon_ovf_template": "photon.xml.template",
"ovftool_deploy_vcenter": "192.168.30.200",
"ovftool_deploy_vcenter_username": "administrator@vsphere.local",
"ovftool_deploy_vcenter_password": "VMware1!"
},
"builders": [
{
"type": "vsphere-iso",
@lamw
lamw / gist:bc191cbb60b9136638e6d1b3f302864f
Created January 2, 2020 16:57
Example Blog Post DMCA Takedown Notice
My name is [YOUR NAME] and I am the owner of the [YOUR BLOG NAME AND URL] blog. A website that your company hosts (according to this WHOIS information) is infringing on at least one of my blog posts.
Here is my original blog post which was published on [PUBLISH DATE/TIME TO YOUR BLOG POST] which I am the owner and creator of.
[LINK TO YOUR ORIGINAL BLOG POST]
The stolen content was slightly altered at the beginning and end to prevent search engines from identifying the stolen content. The unauthorized and infringing copy can be found at:
[LINK TO OFFENDING BLOG POST]
Per the Registry WHOIS information, the individual looks to be named:
[OFFENDER NAME] ([OFFENDER EMAIL]) which hopefully should match the owner of the blog site that is being hosted on [OFFENDER HOSTING PROVIDER NAME].
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 2 columns, instead of 1. in line 1.
letter frequency
Nested_ESXi6.0u3 57
Nested_ESXi6.5u1 22
Nested_ESXi6.7 188
Nested_ESXi6.7u1 171
Nested_ESXi6.5 13
Nested_ESXi6.5u2 116
Nested_ESXi6.5d 110