Skip to content

Instantly share code, notes, and snippets.

View reubenmiller's full-sized avatar

Reuben Miller reubenmiller

  • Hamburg, Germany
View GitHub Profile
@reubenmiller
reubenmiller / debug.sh
Last active March 15, 2025 09:18
thin-edge.io debug info
#!/bin/sh
MODEL=$(cat /proc/cpuinfo | grep Model | cut -d: -f2- | xargs)
OS_NAME=$(cat /etc/os-release | grep PRETTY_NAME | cut -d= -f2- | tr -d '"')
printf '\n'
printf 'Debug information: (copy/paste to the ticket)\n'
printf '\n'
printf '|Property|Value|\n'
printf '|--------|-----|\n'
printf '|OS [incl. version]|`%s`|\n' "${OS_NAME:-unknown}"
@efrecon
efrecon / run.tpl
Last active March 14, 2025 20:38
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@davefunkel
davefunkel / Script-Template-WithCreds.ps1
Last active August 28, 2024 07:24
PowerShell Script Template with Saved Creds
<#
.SYNOPSIS
The synopsis goes here. This can be one line, or many.
This version of the template has inbuilt functions to capture credentials and store it securely for reuse
Avoids the need to have plaintext passwords in the script
.DESCRIPTION
The description is usually a longer, more detailed explanation of what the script or function does.
Take as many lines as you need.