Skip to content

Instantly share code, notes, and snippets.

View metaskills's full-sized avatar
🐙
Being Inkcellent to Each Other

Ken Collins metaskills

🐙
Being Inkcellent to Each Other
View GitHub Profile
@metaskills
metaskills / notes.md
Last active July 17, 2019 01:48
Delayed::Job & Rollbar Integration Notes - https://github.com/rollbar/rollbar-gem/issues/104

About

All output is from the delayed job worker session using the code above.

With Delayed::Plugins::Rollbar

Delayed::Job.enqueue Jobs::Test.new(raise: true, report_exception: false)
@metaskills
metaskills / talk.md
Created July 16, 2019 16:33
AWS Washington DC Meetup

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 01:55
customink/ruby-vips-lambda Latest Runtime Build Errors
$ ./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 April 30, 2019 02:49
Cross-Region Replication S3 Buckets - Bash Glue
#!/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 / gist:5024393
Created February 24, 2013 16:18
Bootstrap 2.3's mixin.less incompatibilities.
@@ -558,13 +567,13 @@
.core (@gridColumnWidth, @gridGutterWidth) {
.spanX (@index) when (@index > 0) {
- (~".span@{index}") { .span(@index); }
+ .span@{index} { .span(@index); }
.spanX(@index - 1);
}
.spanX (0) {}
@metaskills
metaskills / demo.rb
Last active November 28, 2018 03:08
Using IMGIX to Personalize Knolled Images
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 / gist:3170386
Created July 24, 2012 14:47
Mapping A Sass List To A Comma Separated Selector
// Using this code below, I was able to itterate over a list of
// color names and append them to an empty list. I was then able
// to use the selectors from there.
$selectors: ();
@each $value in $my-colors-names {
$selector: unquote(".box.#{$value} .box-header");
$selectors: append($selectors, $selector, comma);
}
#{$selectors} { @extend .color-white; }
@metaskills
metaskills / passenger.rb
Created September 18, 2015 14:16
Rails Multi-Database Best Practices Roundup - config/initializers/passenger.rb - http://technology.customink.com/blog/2015/06/22/rails-multi-database-best-practices-roundup/
if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
if forked
ActiveRecord::Base.clear_all_connections!
MysqlBase.establish_connection MysqlBase.configurations['mysql'][Rails.env]
end
end
end
@metaskills
metaskills / lp.js
Last active January 17, 2018 19:27
LivePerson/Engage Turbolinks Hacking
// Assuming you put the LP init code into a function called window.lpTagCustomInit
document.addEventListener('turbolinks:before-cache', function(){
jQuery("[id^='LP_DIV']").empty();
})
document.addEventListener('turbolinks:load', function(){
delete window.liveperson;
delete window.lpMTagConfig;
delete window.lpTag;
@metaskills
metaskills / reconstructor.coffee
Created January 10, 2018 12:58
Turbolinks & jQuery ReConstructor Pattern
class Toolbar
constructor: ->
document.addEventListener 'turbolinks:before-cache', @turboBeforeCache
@reConstructor()
reConstructor: ->
@registerWaypoint()
registerWaypoint: ->