Skip to content

Instantly share code, notes, and snippets.

View tonmanna's full-sized avatar

Worawut Boontan tonmanna

View GitHub Profile
#!/bin/bash
set -o errexit
clear
# Set versions. Check http://openresty.org for latest version and bundled version of nginx.
OPENRESTY_VERSION=1.9.3.1
NGINX_VERSION=1.9.3
OPENSSL_VERSION=1.0.2d
NPS_VERSION=1.9.32.10
@davidthingsaker
davidthingsaker / default.vlc
Last active October 9, 2023 14:58
Example Varnish 4.0 Configuration
#########################################################################
# This is an example VCL file for Varnish 4.0. #
# From: https://gist.github.com/davidthingsaker/6b0997b641fdd370a395 #
# LICENSE: If this could help you in any way, you are obliged to use it #
# for free with no limitations. #
#########################################################################
# Marker to tell the VCL compiler that this VCL has been adapted to the
# new 4.0 format.
@sheharyarn
sheharyarn / mongo_backup.sh
Last active January 23, 2024 16:54
Mongodump Shell Script for Cronjob
#!/bin/bash
MONGO_DATABASE="your_db_name"
APP_NAME="your_app_name"
MONGO_HOST="127.0.0.1"
MONGO_PORT="27017"
TIMESTAMP=`date +%F-%H%M`
MONGODUMP_PATH="/usr/bin/mongodump"
BACKUPS_DIR="/home/username/backups/$APP_NAME"