Skip to content

Instantly share code, notes, and snippets.

@teddychan
teddychan / _aws_cors_sample_overview.md
Created December 30, 2015 16:01 — forked from iansheridan/_aws_cors_sample_overview.md
AWS CORS sample xml files, solution for Firefox JS/Font access issues

AWS CORS sample xml files

Overview

These are sample files of what can be done for AWS S3 bucket CORS settings

@teddychan
teddychan / Dockerfile
Created October 10, 2015 16:01 — forked from markthethomas/Dockerfile
Example node dockerfile
#using debian:jessie for it's smaller size over ubuntu
FROM debian:jessie
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Set environment variables
ENV appDir /var/www/app/current
# Run updates and install deps
var exec = require('child_process').exec;
var fs = require('fs');
var util = require('util');
var http = require('http');
var url = require('url');
var PDFDocument = require('pdfkit'); // http://pdfkit.org/
http.createServer(function (req, res) {
#!/bin/bash
function getpublickey()
{
x=$(curl -fs http://169.254.169.254/latest/meta-data/public-keys/)
if [ $? -eq 0 ]; then
for i in $x; do
index=$(echo $i|cut -d = -f 1)
format=$(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/)
echo $(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/$format)
module Jekyll
class LessCssFile < StaticFile
def write(dest)
# do nothing
end
end
# Expects a lessc: key in your _config.yml file with the path to a local less.js/bin/lessc
# Less.js will require node.js to be installed
// db.js (just the User model)
var UserSchema = new Schema({
// _id: String,
username: String,
name: String,
gravatar: String,
email: String,
provider: String,
services: String,
#!/bin/sh
#
# redis Startup script for Redis Server
#
# chkconfig: - 90 10
# description: Redis is an open source, advanced key-value store.
#
# processname: redis-server
# config: /etc/redis.conf
# pidfile: /var/run/redis.pid