Run Docker client on Mac OS X connected to a Linux VM
Official Mac Docker Binary!
None of this is really necessary now that the Docker team is releasing official Mac OS X binary builds. Please see moby/moby#3337 for details.
package com.amazon.aws.demo; | |
import java.io.BufferedInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PrintWriter; | |
import java.io.StringWriter; | |
import java.io.Writer; | |
import java.net.URL; | |
import java.net.URLConnection; |
{# use in combination with https://github.com/zyga/django-pagination #} | |
{# and http://twitter.github.com/bootstrap/ #} | |
{# project-dir/templates/pagination/pagination.html #} | |
{% if is_paginated %} | |
{% load i18n %} | |
<div class="pagination"> | |
<ul> | |
{% block previouslink %} | |
{% if page_obj.has_previous %} |
None of this is really necessary now that the Docker team is releasing official Mac OS X binary builds. Please see moby/moby#3337 for details.
# -*- coding: utf-8 -*- | |
from flask import Flask, request, redirect, url_for, session, abort, current_app, json | |
app = Flask(__name__) | |
# This is the very unsecret key from the Flask-docs | |
app.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RT' | |
@app.route('/') |
https://rpgreen.wordpress.com/2016/02/23/a-mapping-template-to-send-everything-to-your-backend-integration/ | |
location/cookie headers: | |
https://stackoverflow.com/questions/35595672/aws-api-gateway-use-302-redirect-and-set-cookie-header | |
https://blog.hiramsoftware.com/blog/day-one-aws-api-gateway/ |
from django.conf import settings | |
from django.utils.encoding import filepath_to_uri | |
from storages.backends.s3boto import S3BotoStorage | |
class StaticStorage(S3BotoStorage): | |
location = settings.STATICFILES_LOCATION | |
def url(self, name, headers=None, response_headers=None, expire=None): | |
return '{}{}'.format(settings.STATIC_URL,filepath_to_uri(name)) |
# Dictionaries are inherently orderless, but lists are ordered! | |
import collections | |
d = { '123': { 'key1': 3, 'key2': 11, 'key3': 3 }, | |
'124': { 'key1': 6, 'key2': 56, 'key3': 6 }, | |
'125': { 'key1': 7, 'key2': 44, 'key3': 9 } } | |
results_list = [] | |
sort_by_dict = {} |
inotifywait -m -e moved_to $BASE | while read line | |
do | |
F=$(echo $line | cut -f3 -d" ") | |
echo "Now uploading $F" | |
s3cmd --force --no-progress put $F s3://mybucket/ & | |
done |
# For every AWS availability zone and instance I care about, check the spot | |
# price for the last ninety days and generate stats about which spot instance | |
# gives the best deal. | |
import boto | |
import boto.ec2 | |
from vowpal_platypus.utils import mean | |
REGIONS = {'us-east-1': ['us-east-1a', 'us-east-1b', 'us-east-1c', 'us-east-1e'], |