Skip to content

Instantly share code, notes, and snippets.

View KimTholstorf's full-sized avatar

Kim Tholstorf KimTholstorf

View GitHub Profile

Keybase proof

I hereby claim:

  • I am KimTholstorf on github.
  • I am kimtholstorf (https://keybase.io/kimtholstorf) on keybase.
  • I have a public key whose fingerprint is C4B3 A639 783E 90B0 81E1 F2C2 6B28 8879 BF18 AAAF

To claim this, I am signing this object:

@KimTholstorf
KimTholstorf / pdfcompress_ghostscript_cli.md
Last active February 9, 2022 13:14
macOS and Linux PDC compesssion CLI

Simple shell function that use ghostscript to reduce the size of a PDF file.

On macOS install Homebrew. On linux use native packamanager.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install the ghostscript package brew install ghostscript or apt/tdnf/whatever install ghostscript

For ZSH edit $HOME/.zshrc and for Bash edit $HOME/.bash_profile and put this function at the bottom:

@KimTholstorf
KimTholstorf / firefox_docker.md
Last active February 10, 2022 12:05
Firefox in a docker container (in VMware Fusion)

brew install vmware-fusion

vctl system start

vctl run -n firefox -p 5800:5800 -v $HOME/.docker_firefox:/config:rw -d jlesage/firefox

http://localhost:5800

@KimTholstorf
KimTholstorf / esxi_esxcli_software_profile_update.md
Last active February 12, 2022 02:07
ESXi CLI online upgrade

Patch a ESXi host using an image profile from VMware's online depot directly from the ESXi shell.

Note: this will pull a default image containing only the default VIB/drivers. You need to use a diffrent method if e.g. pNIC drivers is needed from vendor.

  1. ssh to esxi server
  2. Open firewall for the httpClient to pull online esxcli network firewall ruleset set -e true -r httpClient
  3. (Optional) see version currently running esxcli software profile get
  4. get the list of image profiles esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
  5. Install image profile esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-7.0U3c-19193900-standard
  6. reboot
@KimTholstorf
KimTholstorf / _vcenter_software_update_cli.md
Last active February 15, 2022 07:58
Patch vCenter from commandline

Update vCenter Server Appliance via ssh and commandline

via ssh to VCSA

software-packages stage --url –acceptEulas
software-packages validate
software-packages list –staged
software-packages install –staged

image

#cloud-config
package_upgrade: true
packages:
- zsh
- tmux
- nmap
- curl
- wget
- git
- htop