Skip to content

Instantly share code, notes, and snippets.

@chrisrasco
chrisrasco / 00_nginx_https_rw.config
Created Oct 3, 2017
Elastic Beanstalk Extension for forcing https to Docker
View 00_nginx_https_rw.config
files:
"/tmp/45_nginx_https_rw.sh":
owner: root
group: root
mode: "000644"
content: |
#! /bin/bash
CONFIGURED=`grep -c "return 301 https" /etc/nginx/sites-enabled/elasticbeanstalk-nginx-docker-proxy.conf`
@chrisrasco
chrisrasco / reinvent-2016-youtube.md
Last active Dec 9, 2016 — forked from askulkarni2/reinvent-2016-youtube.md
Links to YouTube recordings of AWS re:Invent sessions and slides
View reinvent-2016-youtube.md
Prefix Name
ALX Alexa
ARC Architecture
BAP Business Apps
BDA Big Data & Analytics
BDM Big Data Miniconference
CMP Compute
CON Containers Miniconference
CTD Content Delivery
View get_youtube_duration.php
<?php
// Call set_include_path() as needed to point to your client library.
require_once 'src/Google/Client.php';
require_once 'src/Google/Service/YouTube.php';
session_start();
/*
* You can acquire an OAuth 2.0 client ID and client secret from the
* {{ Google Cloud Console }} <{{ https://cloud.google.com/console }}>
@chrisrasco
chrisrasco / cf_upload_remote_file.php
Created Nov 20, 2013
An example using php-opencloud 1.7 to upload a remote image to a Cloud Files container
View cf_upload_remote_file.php
<?php
require 'vendor/autoload.php';
$username = '<YOUR USERNAME>';
$api_key = '<YOUR API KEY>';
$my_container = '<CONTAINER NAME>';
$cf_region = '<CF REGION>';
$authURL = 'https://identity.api.rackspacecloud.com/v2.0/';
$credentials = array(
@chrisrasco
chrisrasco / set_cf_cors.py
Created Nov 13, 2013
Set CORS Headers for Cloud Files
View set_cf_cors.py
#!/bin/python
import json, sys, requests, string, random
auth_endpoints = {
"US": "https://identity.api.rackspacecloud.com/v2.0",
"UK": "https://lon.identity.api.rackspacecloud.com/v2.0"
}
username = "XXXX"