Skip to content

Instantly share code, notes, and snippets.

Ken Jenney kjenney

Block or report user

Report or block kjenney

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kjenney
kjenney / handler.py
Created Nov 21, 2018
Boto3 Upload Failure
View handler.py
import os
import io
import json
import boto3
from boto3.exceptions import ResourceNotExistsError
from botocore.exceptions import ClientError
import pprint
import logging
import tempfile
from wand.image import Image
View tworequests.js
var nock = require('nock')
var http = require('http');
var request = require('request-promise');
nock('http://greetings_api:3000')
.post('/getGreeting')
.matchHeader('content-type', 'application/json')
.matchHeader('language', 'es')
.matchHeader('host', 'greetings_api:3000')
.matchHeader('content-length', 0)
@kjenney
kjenney / coffee-ingress.yml
Last active Sep 2, 2018
EKS Test Ingress
View coffee-ingress.yml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: coffee
namespace: ingress-nginx
spec:
tls:
- hosts:
- cafe.example.com
secretName: cafe-secret
@kjenney
kjenney / coffee.yml
Created Jul 18, 2018
EKS Test service and deploy
View coffee.yml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: coffee
namespace: ingress-nginx
spec:
replicas: 2
selector:
matchLabels:
app: coffee
@kjenney
kjenney / rbac.yml
Created Jul 18, 2018
Kubernetes EKS RBAC
View rbac.yml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: ingress-nginx
namespace: ingress-nginx
rules:
- apiGroups:
- ""
resources:
- services
@kjenney
kjenney / eks.yml
Created Jul 18, 2018
CloudFormation EKS
View eks.yml
# kubernetes
#
#
# author: kjenney
# Deploys an EKS cluster with required role and security group
AWSTemplateFormatVersion: 2010-09-09
Description: Deploys an EKS cluster with required role and security group
Parameters:
View gist:e2bd0656e48f433998f2374d6fab7792
security find-generic-password -D "AirPort network password" -a MySSID -g
@kjenney
kjenney / gist:c4537596c0eb3ca0d88419405d3cf40a
Last active Jun 5, 2016
EC2 Create Instance and Resize Filesystem
View gist:c4537596c0eb3ca0d88419405d3cf40a
#!/bin/bash
# Tester script to create an EC2 instance and resize the filesystem
function resizeit {
echo "--------------------- RESIZING ---------------------"
echo
echo -e "\tPowering down the instance - $awsinstanceid"
ec2-stop-instances $awsinstanceid > /dev/null 2>&1
aws ec2 wait instance-stopped --instance-id $awsinstanceid
You can’t perform that action at this time.