Skip to content

Instantly share code, notes, and snippets.

View cornfeedhobo's full-sized avatar

cornfeedhobo cornfeedhobo

View GitHub Profile
#!/bin/bash
set -eu
if [[ $# -eq 0 ]]; then
echo "Usage: $0 <path/to/zip ...> "
exit 1
fi
for zip_file in "${@}"; do
@cornfeedhobo
cornfeedhobo / emulationstation_dedup.sh
Last active March 7, 2025 00:23
dedup games, images, and videos for emulationstation
#!/usr/bin/env bash
set -eu -o pipefail
# Find duplicates based on the root name, and loop through them
find . -type f -name '*.zip' -printf '%f\n' | cut -d'(' -f1 | sort | uniq -d | while read -r line; do
# Prompt the user for which file they want to keep from all the duplicates
# Note: must account for titles that share the same root name
# e.g. 'Foobar' and 'Foobar 2'
@cornfeedhobo
cornfeedhobo / main.tf
Created January 24, 2025 10:29
azure vm terraform
provider "azurerm" {}
resource "azurerm_resource_group" "example" {
name = "example"
location = "North Central US"
}
resource "azurerm_virtual_network" "example" {
name = "example"
address_space = [
@cornfeedhobo
cornfeedhobo / main.go
Created January 9, 2025 23:23
quick and dirty cli to pull objects that were client side encrypted
package main
import (
"context"
"fmt"
"io"
"net/url"
"os"
"strings"
@cornfeedhobo
cornfeedhobo / README.md
Last active November 8, 2024 16:27
#monero-markets

monero-markets

Mission

  1. Meet and make friends with other traders in the Monero community.
  2. To have a channel that fosters learning, analysis, and general discussion related to the Monero Markets.
  3. Make predictions, test, and verify them. Improve your market analysis skills.
  4. Share interesting news, How-Tos, RFCs, etc.
  5. To achieve a high signal to noise ratio of content.

Rules

@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/' \