Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark Edington medington

View GitHub Profile
@medington
medington / ramdisk.sh
Created Jul 16, 2017 — forked from rxin/ramdisk.sh
ramdisk create/delete on Mac OS X.
View ramdisk.sh
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then
@medington
medington / nginx.conf
Created Jul 12, 2017 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
View nginx.conf
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@medington
medington / rsync_clonedir
Last active Dec 28, 2015 — forked from necolas/rsync_backup
Script to clone / backup a directory excluding certain files that may not be of interest for pure archival backups that aren't intended to serve as full fidelity backups of the original.
View rsync_clonedir
#!/bin/sh
# Script to clone / backup a directory using rsync excluding certain files that may not be of
# interest for pure archival backups that aren't intended be full fidelity. The intention is
# that the exclude file will be populated with cached data or uninteresting metadata.
# Use sudo to call this script if you need to copy directories where you don't have permissions.
# rsync options:
# -a archive mode; equals -rlptgoD (no -H,-A,-X)
# -x don't cross device boundaries (ignore mounted volumes)
You can’t perform that action at this time.