Skip to content

Instantly share code, notes, and snippets.

View ob1-sc's full-sized avatar

Simon O'Brien ob1-sc

  • VMware
  • United Kingdom
View GitHub Profile
@ob1-sc
ob1-sc / cp-change-owner
Created February 14, 2024 12:03
Copy file and change ownership
rsync \
--remove-source-files \
--chown=wanteduser:wantedgroup \
/home/oldfolder /home/newfolder
@ob1-sc
ob1-sc / vcenter_sso_pwd
Created August 6, 2023 12:45
Reset vCenter SSO password
Login to vCenter via ssh
/usr/lib/vmware-vmdir/bin/vdcadmintool
Option 3
Enter username to reset (including domain)
@ob1-sc
ob1-sc / vcenter_certs
Created August 6, 2023 12:44
Reset vCenter Certs
login to vCenter via SSH as root
/usr/lib/vmware-vmca/bin/certificate-manager
Option 8

Overview

This guide describes setting up a free, simple, lightweight openldap VM (512 ram, 0.5 cpu) to expose ldap/ldaps services. The VM also includes phpLDAPadmin for web based LDAP administration. The VM is provided as an OVA/ISO and can be downloaded from https://www.turnkeylinux.org/openldap

Getting started

  1. Download OVA and deploy
  2. Setup static IP
  3. (Optional) regenerate openldap certs with correct hostname/ip in SAN/CN
@ob1-sc
ob1-sc / win11-setup.ps1
Last active November 20, 2023 04:13
Windows 11 Setup Script
#Install WinGet
#Based on this gist: https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901
$hasPackageManager = Get-AppPackage -name 'Microsoft.DesktopAppInstaller'
if (!$hasPackageManager -or [version]$hasPackageManager.Version -lt [version]"1.10.0.0") {
"Installing winget Dependencies"
Add-AppxPackage -Path 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
$releases_url = 'https://api.github.com/repos/microsoft/winget-cli/releases/latest'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
@ob1-sc
ob1-sc / chrome-ignore-cert-warning.md
Created June 29, 2021 09:45
Ingnore certificate warning in Chrome

Click anywhere on page and type thisisunsafe

@ob1-sc
ob1-sc / speed-test-cli.md
Last active March 1, 2021 17:09
check bandwidth from cli
curl \
  https://github.com/gesquive/fast-cli/releases/download/v0.2.10/fast-cli-v0.2.10-linux-amd64.tar.gz \
  -Lo fast-cli-v0.2.10-linux-amd64.tar.gz
  
tar -xzf fast-cli-v0.2.10-linux-amd64.tar.gz

./fast-cli
@ob1-sc
ob1-sc / delete-files.md
Created January 6, 2021 14:21
Delete files older than x days
find /path/to/files -type f -mtime +7 -name '*.*' -print0 | xargs -r0 rm --
@ob1-sc
ob1-sc / git-crypt.md
Last active June 3, 2022 15:38
Setup git-crypt

install

sudo apt install git-crypt

init your git repo

cd <root of git repo>
git-crypt init
@ob1-sc
ob1-sc / mac-learning.md
Last active September 3, 2020 08:57
Setup Distributed Switch Mac Learning
  1. Download William Lam scripts and browse to correct folder
git clone https://github.com/lamw/vghetto-scripts.git
cd powershell
  1. Install powershell
$ sudo snap install powershell --classic