I hereby claim:
- I am fermayo on github.
- I am fermayo (https://keybase.io/fermayo) on keybase.
- I have a public key whose fingerprint is 0B8B 21B9 B16D BE84 04C3 AB8D 66D5 CB05 666D AA4A
To claim this, I am signing this object:
class HtmlRegistrationProfile(RegistrationProfile): | |
class Meta: | |
proxy = True | |
def send_activation_email(self, site): | |
"""Send the activation mail""" | |
from django.core.mail import EmailMultiAlternatives | |
from django.template.loader import render_to_string | |
ctx_dict = {'activation_key': self.activation_key, | |
'expiration_days': settings.ACCOUNT_ACTIVATION_DAYS, |
#!/bin/sh | |
CERT_PATH="$HOME/.docker" | |
mkdir -p ${CERT_PATH} | |
if [ ! -f "$CERT_PATH/key.pem" ]; then | |
echo "Generating a new certificate in $CERT_PATH..." | |
openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -subj "/C=US/ST=NewYork/L=NYC/O=Tutum/CN=tutum.user" -keyout ${CERT_PATH}/key.pem -out ${CERT_PATH}/cert.pem >/dev/null 2>&1 | |
echo "This is your new public certificate which you can add to your Tutum account:" | |
else | |
echo "WARNING: An existing certificate has been found in $CERT_PATH" | |
echo "This is your existing public certificate which you can add to your Tutum account:" |
I hereby claim:
To claim this, I am signing this object:
#/bin/sh | |
# Run as root! | |
set -e | |
apt-get update -q | |
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enhanced-networking-ubuntu | |
DEBIAN_FRONTEND=noninteractive apt-get install -y dkms linux-headers-generic | |
wget "http://sourceforge.net/projects/e1000/files/ixgbevf stable/2.16.1/ixgbevf-2.16.1.tar.gz" | |
tar zvxf ixgbevf-2.16.1.tar.gz |
--- /usr/src/ixgbevf-2.16.1/src/kcompat.h.orig 2015-02-03 18:34:22.901474028 +0000 | |
+++ /usr/src/ixgbevf-2.16.1/src/kcompat.h 2015-02-03 18:35:32.577440102 +0000 | |
@@ -3219,8 +3219,6 @@ | |
#define u64_stats_update_begin(a) do { } while(0) | |
#define u64_stats_update_end(a) do { } while(0) | |
#define u64_stats_fetch_begin(a) do { } while(0) | |
-#define u64_stats_fetch_retry_bh(a) (0) | |
-#define u64_stats_fetch_begin_bh(a) (0) | |
#if (RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6,1)) |
lb: | |
image: tutum/haproxy | |
ports: | |
- "80:80" | |
links: | |
- helloworld | |
roles: | |
- global | |
helloworld: | |
image: tutum/hello-world |
REPO="dockercloud/client-proxy" | |
alias notary='notary -s https://notary.docker.io -d ~/.docker/trust' | |
# First you need to import the root key for Docker Cloud | |
notary key import 70340602d65cb8b39db81ca680269d93272b0925e279ec171c0f33d165977405.key | |
# Create target key for $REPO | |
notary init docker.io/$REPO | |
notary key rotate docker.io/$REPO snapshot -r |
import logging | |
import datetime | |
def access_logging(get_response): | |
logger = logging.getLogger("access_logging") | |
def middleware(request): | |
response = get_response(request) | |
log_format = '{remote_addr} - {remote_user} [{time_local}] "{request}" {status} {body_bytes_sent} ' \ |
# Adapted from https://lobster1234.github.io/2017/12/03/run-tasks-with-aws-fargate-and-lambda/ | |
import boto3 | |
import os | |
def lambda_handler(event,context): | |
client = boto3.client('ecs') | |
response = client.run_task( | |
cluster=os.getenv('CLUSTER'), | |
launchType=os.getenv('LAUNCH_TYPE', 'FARGATE'), |
# Required env vars: | |
# $CLUSTER: name of the ECS cluster (i.e. `myapp-prod`) | |
# $TASK_DEFINITION: name and revision of the task definition (i.e. `mytask:1`) | |
# $SUBNETS: comma-separated list of subnets to place the new task (i.e. `sg-12345678,sg-abcdef12`) | |
# $SECURITY_GROUPS: comma-separated list of security groups to be used for the new task (i.e. `subnet-12345678`) | |
import boto3 | |
import os | |
import traceback |