Skip to content

Instantly share code, notes, and snippets.

View JanThiel's full-sized avatar

Jan Thiel JanThiel

View GitHub Profile
@JanThiel
JanThiel / rss2-feed-with-images.php
Last active October 31, 2018 19:20
Minimum WordPress Plugin that adds <image> Tags to the RSS2 Feed. Add this file to a folder calles /wp-content/plugins/rss2-feed-with-images/
<?php
/*
Plugin Name: RSS2 Feed with Images
Plugin URI:
Description: Add image objects to the RSS2 Feed
Version: 1.1
Author: Jan Thiel
Author URI: https://hive-it.de
License: GPL2
*/
@JanThiel
JanThiel / hetzner-robot-get-bulk-authcodes.js
Created September 19, 2020 11:33
Get all the Authcodes from the current list of Domains in the Hetzner Robot. https://robot.your-server.de/domain
async function getAuthCode(id = '') {
const resp = await fetch("https://robot.your-server.de/domain/authcode/id/"+id, {
"headers": {
"accept": "*/*",
"accept-language": "de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7",
"cache-control": "no-cache",
"pragma": "no-cache",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
@JanThiel
JanThiel / get-php_fpm-config-for-datadog-from-ispconfig.sh
Last active January 16, 2023 15:59
Generates the datadog config file for php_fpm based on ISPConfig created FPM Pool configs
#!/bin/bash
read -r -d '' TEMPLATE << EOM
- status_url: unix:///var/lib/php-fpm/{{web}}.sock/status
ping_url: unix:///var/lib/php-fpm/{{web}}.sock/ping
use_fastcgi: true
ping_reply: pong
tags:
- website.domain:{{domain}}
EOM