Skip to content

Instantly share code, notes, and snippets.

"""
Used to create a simple powerpoint table from some json input.
To get the json use e.g.:
curl --header 'Authorization: Basic $CREDS_64' 'https://<BASE_URL>/gateway/cdp-proxy-api/nifi-app/nifi-api/controller-services/d74f7a69-4b38-3a09-9a59-a2894e543856' | jq '.com
ponent.properties'
"""
import json
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR, MSO_AUTO_SIZE
@MarWeUMR
MarWeUMR / powercli-vsphere.md
Last active January 27, 2024 12:16
powercli-cheat-sheet.md

How to install power cli in powershell

 Install-Module -Name VMware.PowerCLI

How to allow bad certificates

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
@MarWeUMR
MarWeUMR / nix-cheat-sheet.md
Last active April 9, 2024 14:35
Nix Cheat Sheet

How to increase API rate-limit with GitHub?

Just put this in /etc/nix/nix.conf with a personal access token.

access-tokens = github.com=<TOKEN>

How to provide a binary under a different name?

@MarWeUMR
MarWeUMR / wsl-config.md
Last active February 25, 2024 16:26
WSL Configuration
# /etc/wsl.conf

[user]
  default=$USER # replace with your wsl user name

[boot]
  systemd=true

[interop]

How to use the ansible debugger

[192.0.2.10] TASK: install package (debug)> p task
TASK: install package
[192.0.2.10] TASK: install package (debug)> p task.args
{u'name': u'{{ pkg_name }}'}
[192.0.2.10] TASK: install package (debug)> p task_vars
{u'ansible_all_ipv4_addresses': [u'192.0.2.10'],
 u'ansible_architecture': u'x86_64',
@MarWeUMR
MarWeUMR / git-cheat-sheet.md
Last active October 15, 2023 14:31
Git Stuff

How to initialize a bare git repo with nice worktree structure

my-awesome-project
 - git-technical-directory
 - new-feature
 - hotfix

Start with a directory and clone your remote:

@MarWeUMR
MarWeUMR / cli-cheat-sheet.md
Last active June 5, 2024 15:09
CLI Cheat-Sheet

How to find the java home dir?

This is especially useful for nix installed jdks.

java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home'

How to list the disk usage sorted by size

@MarWeUMR
MarWeUMR / k8s-cheat-sheet.md
Last active April 4, 2024 06:42
Kubernetes Cheat Sheet

How to get kubernetes secrets decoded right away

kubectl get secret my-secret-name -o json | jq '.data|map_values(@base64d)'

How to install Rancher Local-Path Provisioner

What does this do? If, for instance, a bitnami helm chart installs a database pod, the pod needs storage. By using this method here, the persistant volumes can be created on the fly without having to manually set them up.

@MarWeUMR
MarWeUMR / rke2-ha.md
Last active January 28, 2025 18:25
Install RKE2-HA Kubernetes Cluster
@MarWeUMR
MarWeUMR / gist:ce6771bcbe838cc97e3dfad9cbe93b6e
Last active August 31, 2023 19:40
Enable kubectl & helm completions

Prerequisites

This should be working on Ubuntu together with bash.

  • bash-completions should be installed
  • kubectl should be installed