Skip to content

Instantly share code, notes, and snippets.

View cornfeedhobo's full-sized avatar

cornfeedhobo cornfeedhobo

View GitHub Profile
@cornfeedhobo
cornfeedhobo / _helpers.tpl
Last active January 22, 2024 02:06
Helm Macro - toYamlPretty - A recursive YAML formatter
{{- define "toPrettyYaml" -}}
{{- $out := "" -}}
{{- range $k, $v := . -}}
{{- if not (empty $v) -}}
{{- /* Walk any maps */ -}}
{{- if kindIs "map" $v -}}
{{- $out = (print $out
$k ":\n"
(include "toPrettyYaml" $v | indent 2)

L.G.T.M. Helm Chart Issue

This document proposes new standards for the L.G.T.M. observability stack helm charts.

prometheus-community helm charts review

prometheus-community has a lot of charts, but all the multi-charts center around the operator.

I propose getting them involved in this effort and decompose the existing charts.

@cornfeedhobo
cornfeedhobo / get-helm-chart.sh
Last active November 5, 2023 14:13
Retrieve helm deployment json from a provided secret name
#!/usr/bin/env bash
if [ $# -ne 1 ]; then
cat >&2 <<-USAGE
Usage: $0 <namespace>/<secret>
Example: $0 cert-manager/sh.helm.release.v1.cert-manager.v1
USAGE
exit 1
fi
@cornfeedhobo
cornfeedhobo / Dockerfile
Last active April 18, 2023 20:29
flutter devcontainer example
FROM opensuse/tumbleweed:latest
RUN set -ex && \
rpm --import https://dl.google.com/linux/linux_signing_key.pub && \
zypper addrepo http://dl.google.com/linux/chrome/rpm/stable/x86_64 google-chrome && \
rpm --import https://packages.microsoft.com/keys/microsoft.asc && \
zypper addrepo https://packages.microsoft.com/yumrepos/vscode vscode && \
zypper refresh && \
zypper install --no-confirm \
binutils \
@cornfeedhobo
cornfeedhobo / sort-timestamp-history
Last active May 5, 2022 01:15
Sort bash history files with timestamps
#!/bin/sh
# Example usage:
# cat hosts/*/.bash_history | sort-timestamp-history > merged_history
exec \
sed \
-e '/^$/d' \
-e '/^#/N' \
-e '/^#/!s/^/#0\n/' \
@cornfeedhobo
cornfeedhobo / README.md
Last active July 26, 2023 12:15
Framework Laptop Customizations

Framework Laptop Customizations

This documents the changes made while installing OpenSUSE LEAP 15.3 on the Framework Laptop (1st edition).


Guided install

During the guided install, there are some minor changes that will make things smoother later.

@cornfeedhobo
cornfeedhobo / 99-framework.conf
Created February 28, 2022 17:49
Framework Laptop Customizations
Section "InputClass"
Identifier "Framework Clickpad"
MatchProduct "Touchpad"
MatchDriver "synaptics"
# Enable clicking
Option "ClickPad" "true"
Option "EmulateMidButtonTime" "0
Option "ClickMethod" "clickfinger"
Option "ClickFinger1" "1"
#!/usr/bin/python3
# Import PyGObject
# PyGObject is a Python package which provides bindings for GObject based libraries such as GTK, GStreamer, WebKitGTK, GLib, GIO and many more.
from gi import require_version
# for arguments
from sys import argv
from os import geteuid
_rl_enabled ()
{
[[ "$( bind -v )" == *$1+([[:space:]])on* ]]
}
---
- hosts: "notforyou"
any_errors_fatal: true
pre_tasks:
- name: "Disable selinux"
become: true
selinux: