Skip to content

Instantly share code, notes, and snippets.

Avatar

Jan Thiel JanThiel

View GitHub Profile
@JanThiel
JanThiel / get-php_fpm-config-for-datadog-from-ispconfig.sh
Created May 10, 2021
Generates the datadog config file for php_fpm based on ISPConfig created FPM Pool configs
View get-php_fpm-config-for-datadog-from-ispconfig.sh
#!/bin/bash
read -r -d '' TEMPLATE << EOM
- status_url: unix:///var/lib/php5-fpm/{{web}}.sock/status
ping_url: unix:///var/lib/php5-fpm/{{web}}.sock/ping
use_fastcgi: true
ping_reply: pong
tags:
- website.domain:{{domain}}
EOM
@JanThiel
JanThiel / hetzner-robot-get-bulk-authcodes.js
Created Sep 19, 2020
Get all the Authcodes from the current list of Domains in the Hetzner Robot. https://robot.your-server.de/domain
View hetzner-robot-get-bulk-authcodes.js
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 / rss2-feed-with-images.php
Last active Oct 31, 2018
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/
View rss2-feed-with-images.php
<?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
*/