Skip to content

Instantly share code, notes, and snippets.

View wiredmax's full-sized avatar
👨‍🚀
Hack the Planet!

Maxime Poulin wiredmax

👨‍🚀
Hack the Planet!
View GitHub Profile
@wiredmax
wiredmax / mongodb-s3-backup.sh
Last active January 1, 2018 19:13 — forked from eladnava/mongodb-s3-backup.sh
Automatically backup a MongoDB database to S3 using mongodump, tar, awscli and twilio API SMS notification (Ubuntu 16.04 LTS)
#!/bin/sh
# Make sure to:
# 1) Name this file `backup.sh` 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) Fill Twilio twilio configuration
# 6) 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)
# 7) Run chmod +x backup.sh
#!/bin/bash
### BEGIN INIT INFO
# Provides: redis sentinel
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts redis sentinel
# Description: Starts redis sentinel using start-stop-daemon
### END INIT INFO
@wiredmax
wiredmax / haproxy.cfg
Last active July 15, 2022 23:08 — forked from sidupadhyay/sample.config
Sample HA-Proxy configuration for load balancing SockJS running on Node.JS servers.
global
maxconn 10000 # Total Max Connections. This is dependent on ulimit
nbproc 2
defaults
mode http
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000