Skip to content

Instantly share code, notes, and snippets.

exec > /tmp/${PROJECT_NAME}_archive.log 2>&1
if [ "true" == ${ALREADYINVOKED:-false} ]
echo "RECURSION: Detected, stopping"
export ALREADYINVOKED="true"
eladnava / private.xml
Last active Sep 5, 2016
Karabiner private.xml for volume and music playback controls using F13 - F19 keys on wired Apple Keyboard
View private.xml
<?xml version="1.0"?>
<name>F19 to Sleep</name>
KeyCode::VK_CONSUMERKEY_EJECT, ModifierFlag::OPTION_L | ModifierFlag::COMMAND_L
eladnava /
Last active Sep 22, 2020
Automatically backup a MongoDB database to S3 using mongodump, tar, and awscli (Ubuntu 14.04 LTS)
# Make sure to:
# 1) Name this file `` and place it in /home/ubuntu
# 2) Run sudo apt-get install awscli to install the AWSCLI
# 3) Run aws configure (enter s3-authorized IAM user and specify region)
# 4) Fill in DB host + name
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket)
# 6) Run chmod +x
# 7) Test it out via ./
You can’t perform that action at this time.