Skip to content

Instantly share code, notes, and snippets.

@heqzha
heqzha / backup_zip.sh
Last active December 16, 2019 23:24
backup current folder with datetime by zip
parent=`basename $(pwd)`
zip -r "$parent-$(date +"%Y-%m-%dT%H-%M-%S").zip" ./*
@heqzha
heqzha / configure-mailgun
Last active May 9, 2018 01:58 — forked from jgeewax/configure-mailgun
Script to configure Postfix for Mailgun
#!/bin/bash
# Configuration for the script
POSTFIX_CONFIG=/etc/postfix/main.cf
POSTFIX_SASL=/etc/postfix/sasl_passwd
function confirm () {
read -r -p "${1:-Are you sure? [Y/n]} " response
if [[ $response == "" || $response == "y" || $response == "Y" ]]; then
echo 0;