Skip to content

Instantly share code, notes, and snippets.

@q3cpma
q3cpma / anonymize_pdf.sh
Last active September 27, 2025 12:46
Anonymize PDFs
#!/bin/sh
# Portability: Linux, *BSD, MacOS, Illumos (mktemp -d)
# Dependencies: Tcl (>=8.5), exiftool, mutool or qpdf
set -eu
echo() { printf '%s\n' "$*"; }
die() { echo "$@" >&2; exit 1; }
has_cmd() { command -v "$1" >/dev/null; }
usage()
@guisea
guisea / needs-restarted
Last active May 30, 2024 18:18
A Custom Check for CheckMK - Checks RHEL/Debian and derived OS's for pending reboots
#!/bin/bash
# Filename: /local/share/check_mk/agents/custom/linux-reboot/lib/local/600/needs-restarted
source /etc/os-release
VERSION=$(echo ${VERSION} | awk -F . '{ print $1 }')
# RHEL and Derivatives
if ([[ $ID_LIKE =~ 'fedora' ]] || [[ $ID =~ 'rhel' ]]) && [[ $VERSION =~ '8' ]];
then
# RHEL 8
# Source: https://gist.github.com/c7cdfef142bd65cc744789d3c1e90170
###########################################
# Talos Linux: OS Designed For Kubernetes #
# https://youtu.be/iEFb2Zg4xUg #
###########################################
# Additional Info:
# - Talos Linux: https://www.talos.dev/
# - How To Create, Provision, And Operate Kubernetes With Cluster API (CAPI): https://youtu.be/8yUDUhZ6ako
@jbouse
jbouse / jenkins-dump-credentials.groovy
Last active August 26, 2020 20:12 — forked from timja/jenkins-dump-credentials.groovy
Dump jenkins credentials - use in script console
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import com.cloudbees.jenkins.plugins.awscredentials.*
import org.jenkinsci.plugins.plaincredentials.impl.*
import hudson.plugins.blazemeter.*
domain = Domain.global()
@pat
pat / LICENSE.txt
Last active February 4, 2023 21:02
Running Setup SQL scripts on an RDS instance within a VPC, via Terraform
The MIT License (MIT)
Copyright (c) 2018 Pat Allan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@timja
timja / jenkins-dump-credentials.groovy
Last active August 12, 2025 07:53
Dump jenkins credentials - use in script console
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import org.jenkinsci.plugins.plaincredentials.impl.*
// def item = Jenkins.instance.getItem("your-folder")
@jeremyckahn
jeremyckahn / cs.md
Last active October 2, 2020 20:40
Practical Computer Science Fundamentals

Practical Computer Science Fundamentals

CompSci degrees cost a lot of money, take a lot of time, and aren't a viable option for a lot of folks. Luckily, much of what you'll learn in a proper Computer Science program can be self-taught online for free. This gist is a roundup of some of the most helpful resources I've found.

Where I'm coming from

I'm not pursuing a deep, academic comprehension of CS concepts — my goal is to become respectably conversant about the most prevalent and relevant subjects in the field.

Starting points

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active January 8, 2026 13:36 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active January 5, 2026 19:18
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux