Skip to content

Instantly share code, notes, and snippets.

:: ###### BACK-UP JOB ######
@ECHO OFF
:: Set the constants
SET BACKUP_DIR=C:\path\to\_backup
SET TEMP_DIR=%BACKUP_DIR%\TEMP
SET TODAY=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
SET ARCHIVE_DIR=%BACKUP_DIR%\%TODAY%
SET WWWROOT_NAME="ProjectName"
SET WWWROOT_SOURCE=C:\path\to\wwwroot
@hertell
hertell / swap.pp
Last active December 23, 2015 20:19 — forked from philfreo/swap.pp
Updated script to handle multiple swapfiles instead of just one. It's easier to add swapfiles in chunks if eg. it's needed
# Manages swapspace on a node.
#
# This version is based on https://gist.github.com/philfreo/6576492 and that
# again is based on https://gist.github.com/Yggdrasil/3918632
#
# Parameters:
# - $ensure Allows creation or removal of swapspace and the corresponding file.
# - $swapfile Defaults to /mnt which is a fast ephemeral filesystem on EC2 instances.
# This keeps performance reasonable while avoiding I/O charges on EBS.
# - $swapsize Size of the swapfile in MB. Defaults to memory size.