Skip to content

Instantly share code, notes, and snippets.

@double16
double16 / Config.groovy
Last active August 29, 2015 14:11
cdn-asset-pipeline Config.groovy snippet
def appName = grails.util.Metadata.current.'app.name'
def appVersion = grails.util.Metadata.current.'app.version'
def cdnAccessKey = System.getenv('CDN_AWS_ACCESS_KEY_ID')
def cdnSecretKey = System.getenv('CDN_AWS_SECRET_ACCESS_KEY')
if (cdnAccessKey && cdnSecretKey) {
grails {
assets {
cdn {
provider = 's3' // Karman provider
directory = ‘mybucket’
@double16
double16 / cdn-upload-policy.json
Last active August 29, 2015 14:11
Amazon S3 user policy for uploading via Grails cdn-asset-pipeline plugin
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::mybucket/*”, "arn:aws:s3:::mybucket"
]
}
@double16
double16 / Vagrantfile
Last active August 29, 2015 14:10 — forked from tvjames/Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.