Skip to content

Instantly share code, notes, and snippets.

View pulpfree's full-sized avatar
💭
Enjoying the benefits of AWS Lambda and Golang

Ron Dyck pulpfree

💭
Enjoying the benefits of AWS Lambda and Golang
View GitHub Profile
@pulpfree
pulpfree / mongodb-s3-backup.sh
Created July 26, 2017 03:26 — forked from eladnava/mongodb-s3-backup.sh
Automatically backup a MongoDB database to S3 using mongodump, tar, and awscli (Ubuntu 14.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) 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 backup.sh
# 7) Test it out via ./backup.sh
@pulpfree
pulpfree / types.js
Created February 2, 2017 14:54 — forked from alexnm/types.js
const QUACK = "app/duck/QUACK";
const SWIM = "app/duck/SWIM";
export default {
QUACK,
SWIM
};
@pulpfree
pulpfree / ec2.tf
Created January 25, 2017 22:18 — forked from solarce/ec2.tf
terraform.io example template for ec2 instance with tags
# The various ${var.foo} come from variables.tf
# Specify the provider and access details
provider "aws" {
region = "${var.aws_region}"
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
}
@pulpfree
pulpfree / baseResolvers.js
Created December 6, 2016 02:25 — forked from thebigredgeek/baseResolvers.js
Breed-able Resolvers
import { AlreadyAuthenticatedError, NotAuthenticatedError, NotAuthorizedError } from '../errors/functional';
import createResolver from '../lib/createResolver';
export const baseResolver = createResolver();
export const isAuthenticatedResolver = baseResolver.createResolver(
(root, args, context) => {
if (!context.user || !context.user.id) throw new NotAuthenticatedError();
}
@pulpfree
pulpfree / README
Created December 23, 2012 21:05 — forked from joelambert/README
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
http://www.joelambert.co.uk
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php
@pulpfree
pulpfree / README
Created December 23, 2012 17:48 — forked from joelambert/README
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
http://www.joelambert.co.uk
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php