Skip to content

Instantly share code, notes, and snippets.

View SnailShea's full-sized avatar
🦊

Shea Zerda SnailShea

🦊
View GitHub Profile
@SnailShea
SnailShea / curl
Last active May 22, 2023 04:03
Export message metadata from rspamd metadata_exporter to logstash http input
curl -X PUT -H 'Content-Type: application/json' -d @mail_log_policy.json http://localhost:9200/_ilm/policy/mail_log_policy
curl -X PUT -H 'Content-Type: application/json' -d @mail_log_template.json http://localhost:9200/_index_template/mail_log_template
curl -X PUT -H 'Content-Type: application/json' -d @mail_log_index.json http://localhost:9200/mail-000001
@SnailShea
SnailShea / webp_to_png
Created April 10, 2023 13:03
Convert WEBP files to PNG quickly with Python
#!/usr/bin/python3
# Usage: webp_to_png <filename>
def arg_chk(args):
if len(args) != 2:
print("Script takes exactly one argument")
quit()
@SnailShea
SnailShea / ipa-pve-getcert
Created April 9, 2023 00:37
Script to use certificates from a FreeIPA CA in the Proxmox web interface
#!/bin/bash
# Adapted from https://gist.github.com/rechner/a176be6ec88432e7d8c5ee2f7ab37ccd
# This script assumes the local machine has already been joined to your FreeIPA domain with ipa-client-install
# DOMAIN should be set to your FreeIPA-controlled domain, not the FQDN of the FreeIPA server
# NODE should be the short hostname of your Proxmox node, not a FQDN
DOMAIN=domain.tld
NODE=pve1
KEY=/etc/pve/nodes/$NODE/pve-ssl.key
PEM=/etc/pve/nodes/$NODE/pve-ssl.pem

Keybase proof

I hereby claim:

  • I am snailshea on github.
  • I am fennec (https://keybase.io/fennec) on keybase.
  • I have a public key whose fingerprint is CFEE 4418 3634 502C FE07 8403 F96B A95F FAF6 1140

To claim this, I am signing this object: