Skip to content

Instantly share code, notes, and snippets.

Ken Collins metaskills

Block or report user

Report or block metaskills

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
@metaskills
metaskills / aurora-stack.ts
Last active Jan 1, 2020
Aurora Serverless IaC Example Using CDK & TypeScript
View aurora-stack.ts
// Run `mkdir aurora && cd aurora && cdk init sample-app --language=typescript`
// and replace the `lib/aurora-stack.ts` with this file. May need to remove non-needed
// packages from package.json and add others like "@aws-cdk/aws-rds" and
// "@aws-cdk/aws-secretsmanager"
//
// Running assumes you pass in the following environment variables or hard code values.
//
// * ASCLUSTER_MASTER_USER
// * ASCLUSTER_MASTER_PASS
// * SUBNET_GROUP_NAME
@metaskills
metaskills / gist:3752c66ed2b50599e4b66b7664f1d856
Created Dec 28, 2019
ActiveRecord Aurora Serverless - Foreign Key Check Debugging
View gist:3752c66ed2b50599e4b66b7664f1d856
EXECUTE: SELECT 1 70195508832200
EXECUTE: SELECT @@FOREIGN_KEY_CHECKS 70195508832200
(26.8ms) SELECT @@FOREIGN_KEY_CHECKS
EXECUTE: SET FOREIGN_KEY_CHECKS = 0 70195508832200
(26.3ms) SET FOREIGN_KEY_CHECKS = 0
BEGIN AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200
EXECUTE: DELETE FROM `topics` AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200
Fixtures Load (27.2ms) DELETE FROM `topics`
EXECUTE: DELETE FROM `developers` AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200
Fixtures Load (27.7ms) DELETE FROM `developers`
@metaskills
metaskills / talk.md
Created Jul 16, 2019
AWS Washington DC Meetup
View talk.md

Title

Functions to Full-Stack & Back Again

Description

Learn how thinking big with AWS Lambda and moving to Full-Stack Serverless using Web Application Frameworks could help your company's cloud adoption & innovation cycles. This is Custom Ink's story of our lift & shift cloud migration to cloud-native using Lamby (https://lamby.custominktech.com), a Rack/HTTP adapter for API Gateway or Application Load Balancers, as one of our tools to help deliver AWS Well-Architected solutions in a versatile programming environment that uses many languages.

Bio

@metaskills
metaskills / log.txt
Created May 15, 2019
customink/ruby-vips-lambda Latest Runtime Build Errors
View log.txt
$ ./bin/build
Sending build context to Docker daemon 130.6kB
Step 1/12 : FROM lambci/lambda:build-ruby2.5
---> b71c0ed10ee3
Step 2/12 : WORKDIR /build
---> Running in 661fe3c895e3
Removing intermediate container 661fe3c895e3
---> 60ba7e7f1d27
Step 3/12 : ARG VIPS_VERSION=8.7.4
---> Running in e29f20323847
@metaskills
metaskills / global.sh
Created Apr 30, 2019
Cross-Region Replication S3 Buckets - Bash Glue
View global.sh
#!/bin/bash
set -e
if [ -z ${STAGE_ENV+x} ]; then
echo "Missing STAGE_ENV env variable!"
exit 126
fi
REGION1="us-east-1"
@metaskills
metaskills / deploy.sh
Created Apr 30, 2019
Cross-Region Replication S3 Buckets - Single CloudFormation Template.
View deploy.sh
aws cloudformation deploy \
--region ${AWS_DEFAULT_REGION} \
--template-file "template.yaml" \
--stack-name "my-buckets-${RAILS_ENV}" \
--s3-bucket "$CLOUDFORMATION_BUCKET" \
--s3-prefix "my-buckets-${RAILS_ENV}" \
--capabilities "CAPABILITY_IAM" \
--tags \
"env=${STAGE_ENV}" \
"group=ecommerce" \
@metaskills
metaskills / demo.rb
Last active Nov 28, 2018
Using IMGIX to Personalize Knolled Images
View demo.rb
require 'open-uri'
require 'bundler/inline'
gemfile true do
source 'https://rubygems.org'
gem 'imgix'
gem 'launchy'
end
DESIGN_URL = 'https://www.customink.com/email/imgix/design.png'
@metaskills
metaskills / reconstructor.coffee
Created Jan 10, 2018
Turbolinks & jQuery ReConstructor Pattern
View reconstructor.coffee
class Toolbar
constructor: ->
document.addEventListener 'turbolinks:before-cache', @turboBeforeCache
@reConstructor()
reConstructor: ->
@registerWaypoint()
registerWaypoint: ->
@metaskills
metaskills / turbolinks_enquire.coffee
Created Jan 10, 2018
Turbolinks With Enquire JS
View turbolinks_enquire.coffee
@metaskills
metaskills / turbolinks_trustpilot.coffee
Created Jan 10, 2018
Turbolinks Trustpilot Integration
View turbolinks_trustpilot.coffee
You can’t perform that action at this time.