Skip to content

Instantly share code, notes, and snippets.

View KristianP26's full-sized avatar

Kristian Partl KristianP26

View GitHub Profile
@KristianP26
KristianP26 / backup.sh
Last active May 21, 2026 07:45
Auto-discovery Docker backup to Cloudflare R2: volumes + DB dumps + bind mounts, encrypted via rclone, with retention and Healthchecks.io monitoring. No config needed for new containers.
#!/bin/bash
# Auto-discovery Docker backup script
# Automatically finds and backs up ALL Docker volumes and databases.
# Uploads to Cloudflare R2, then cleans up local files.
# No configuration needed when adding new containers.
set -euo pipefail
HC_BACKUP_URL="${HC_BACKUP_URL:?set HC_BACKUP_URL}"
@KristianP26
KristianP26 / Alza.cz MPN
Last active August 13, 2025 09:22
This is Violentmonkey script which will show you product MPN next to its name on Alza.
// ==UserScript==
// @name Alza.cz MPN
// @namespace https://gist.github.com/KristianP26/46cf9a12a8db1dc2127b6db26b9f570a
// @version 1.0
// @description Extract MPN and Add New H1
// @author Kristian Partl
// @match https://www.alza.cz/*
// @match https://www.alza.sk/*
// @grant none
// ==/UserScript==
@KristianP26
KristianP26 / Jira Collapse Sidebar Button.user.js
Last active July 16, 2024 17:03
Tampermonkey Script: Button that will allow you to collape right sitebar in Jira issue view
// ==UserScript==
// @name Jira Collapse Sidebar Button
// @namespace https://gist.github.com/KristianP26/da54152268e26b73893fa7792f04196f
// @version 1.0
// @description Button that will allow you to collape right sitebar in Jira issue view
// @author Kristian Partl
// @homepage https://github.com/KristianP26
// @match https://*/browse/*
// @match https://*/projects/*/issues/*
// @grant none
@KristianP26
KristianP26 / steam_workshop_item_subscriber.php
Last active July 16, 2024 17:02
PHP Function for Retrieving Steam Workshop Item Subscriber Count
<?php
function getSteamWorkshopSubscriberCount($workshopItemId) {
$apiUrl = "https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1/";
$postData = [
"itemcount" => 1,
"publishedfileids[0]" => $workshopItemId,
];
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);