Skip to content

Instantly share code, notes, and snippets.

@autoize
autoize / backupToS3.sh
Created September 8, 2017 17:19
NextCloud Backup to Amazon S3
#!/bin/sh
# NextCloud to Amazon S3 Backup Script
# Author: Autoize (autoize.com)
# This script creates an incremental backup of your NextCloud instance to Amazon S3.
# Amazon S3 is a highly redundant block storage service with versioning and lifecycle management features.
# Requirements
# - Amazon AWS Account and IAM User with AmazonS3FullAccess privilege
@agarzon
agarzon / queueCounter.sh
Last active March 28, 2023 01:15
alert based in mail queue size for postfix and plesk
#!/bin/sh
MAIL_BIN=`command -v mail`
QUEUE_SIZE=`/usr/sbin/postqueue -p | tail -n1 | awk '{print $5}'`
QUEUE_SUMMARY=`/usr/sbin/qshape -s deferred | head`
MAILTO="xxx@gmail.com"
LIMIT=100
function send_notification_mail() {
echo $QUEUE_SUMMARY | $MAIL_BIN -s "WARNING: mail queue critical on $HOSTNAME" $MAILTO
@jadeatucker
jadeatucker / HOWTODMG.md
Last active December 26, 2023 09:02
How to create a "DMG Installer" for Mac OS X

Creating a "DMG installer" for OS X

A DMG Installer is convenient way to provide end-users a simple way to install an application bundle. They are basically a folder with a shortcut to the Applications directory but they can be customized with icons, backgrounds, and layout properties. A DMG file (.dmg) is a Mac OS X Disk Image file and it is used to package files or folders providing compression, encryption, and read-only to the package.

##Creating the DMG file #Disk Utility