Skip to content

Instantly share code, notes, and snippets.

<?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 / 00_nginx_https_rw.config
Created October 3, 2017 13:18
Elastic Beanstalk Extension for forcing https to Docker
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 December 9, 2016 03:09 — forked from askulkarni2/reinvent-2016-youtube.md
Links to YouTube recordings of AWS re:Invent sessions and slides
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
@chrisrasco
chrisrasco / cf_upload_remote_file.php
Created November 20, 2013 22:48
An example using php-opencloud 1.7 to upload a remote image to a Cloud Files container
<?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 November 13, 2013 20:28
Set CORS Headers for Cloud Files
#!/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"