Skip to content

Instantly share code, notes, and snippets.

@SmartFinn
SmartFinn / lvtimesnap.sh
Last active December 4, 2023 19:19
A script for creating/rotating snapshots of LVM volumes via (ana)cron
#!/usr/bin/env bash
#
# Creating and rotating snapshots of LVM volumes
#
# https://gist.github.com/SmartFinn/013dc2670f6605826acfae8e25c11178
#
# Copyright (c) 2023 Serhii Yeremenko (https://github.com/SmartFinn)
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
@codebykyle
codebykyle / connect.ps1
Last active October 14, 2024 19:04
Windows Terminal Split Pane Powershell Script - v2
using namespace System.Collections.Generic
# Encapsulate an arbitrary command
class PaneCommand {
[string]$Command
PaneCommand() {
$this.Command = "";
}
@lguenth
lguenth / Zotero Highlights Template Without Templater.md
Last active March 2, 2024 09:02
Zotero Integration Templates
created modified
{"importDate|format(\"YYYY-MM-DD\")"=>nil}
{"importDate|format(\"YYYY-MM-DD\")"=>nil}

{{shortTitle|replace(":", " –")}}

Quelle: [[@{{citekey}}]]

{% if annotations.length > 0 -%} Hinzugefügt am [[{{importDate | format("YYYY-MM")}}#{{importDate | format("YYYY-MM-DD")}}]]

@Salamafet
Salamafet / check_certificate.sh
Created August 30, 2022 12:26
Gotify notification when certificate expire
#!/bin/bash
certificat=/usr/certificate/example.com/cert.pem
gotify_url="https://push.example.com/message?token=xxxxx"
gotify_title="Synology Certificate Expiry"
function check_certificat () {
if openssl x509 -checkend $((${1}*86400)) -noout -in $certificat; then
return 1
else