Skip to content

Instantly share code, notes, and snippets.

View ktbartholomew's full-sized avatar

Keith Bartholomew ktbartholomew

View GitHub Profile
@ktbartholomew
ktbartholomew / any-file-in-webpack-bundle.js
Created August 10, 2016 03:22
webpack environment variable substitution
// any environment variables grabbed by the environment file and/or shell environment
// can be used as properties of process.env like so:
console.log(process.env.API_URL);
@ktbartholomew
ktbartholomew / clusters.json
Created April 19, 2016 16:17
Docker Remote API responses
[
{
"Id": "1721a1902935b70929b733d20c9fcd016a8b7e59a2a6fa673029a7ff4bb2bb0a",
"Names": [
"/a01dc85a-4780-4336-a6b7-95c55bacf523-n2/swarm-agent"
],
"Image": "swarm:1.1.3",
"Command": "/swarm join --addr=10.69.210.186:42376 consul://localhost:12000",
"Created": 1461014803,
"Status": "Up 18 hours",
@ktbartholomew
ktbartholomew / index.php
Last active February 19, 2016 17:59
List servers (with details) with PHP-opencloud
<?php
require('./vendor/autoload.php');
use OpenCloud\Rackspace;
header('Content-Type: text/plain');
$client = new Rackspace(Rackspace::US_IDENTITY_ENDPOINT, array(
'username' => getenv('RACKSPACE_USERNAME'),
@ktbartholomew
ktbartholomew / index.html
Created December 2, 2015 06:19
Upload file to Rackspace Cloud Files via AJAX
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Cloud Files Public Upload</title>
</head>
<body>
<form id="form">
<input type="file" id="file">
<input type="submit" value="Upload">