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 / wait_until.rb
Last active Dec 12, 2019
Never sleep() using Capybara!
View wait_until.rb
# WAIT! Do consider that `wait` may not be needed. This article describes
# that reasoning. Please read it and make informed decisions.
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations?
describe 'Modal' do
should 'display login errors' do
visit root_path
metaskills / gist:893599
Created Mar 29, 2011
A Copy Of sp_MSforeachtable Stored Procedure For Azure, Uses sp_MSforeach_worker
View gist:893599
CREATE proc [dbo].[sp_MSforeachtable]
@command1 nvarchar(2000), @replacechar nchar(1) = N'?', @command2 nvarchar(2000) = null,
@command3 nvarchar(2000) = null, @whereand nvarchar(2000) = null,
@precommand nvarchar(2000) = null, @postcommand nvarchar(2000) = null
declare @mscat nvarchar(12)
select @mscat = ltrim(str(convert(int, 0x0002)))
if (@precommand is not null)
metaskills /
Last active Dec 6, 2019
Ubuntu 16.04 Install Latest FreeTDS
$ sudo apt-get install wget
$ sudo apt-get install build-essential
$ sudo apt-get install libc6-dev
$ wget
$ tar -xzf freetds-1.00.27.tar.gz
$ cd freetds-1.00.27
$ ./configure --prefix=/usr/local --with-tdsver=7.3
$ make
$ make install
View gist:404173
class Numeric
def negative
if self <= 0
self * -1
metaskills / gist:2836849
Created May 30, 2012
Basic Save & Open Page For Poltergeist
View gist:2836849
def save_and_open_page
dir = "#{Rails.root}/tmp/cache/capybara"
file = "#{dir}/#{'%Y-%m-%d-%H-%M-%S')}.png"
FileUtils.mkdir_p dir
page.driver.render file
wait_until { File.exists?(file) }
system "open #{file}"
metaskills /
Last active Jul 17, 2019
Delayed::Job & Rollbar Integration Notes -


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

With Delayed::Plugins::Rollbar

Delayed::Job.enqueue true, report_exception: false)
metaskills /
Created Jul 16, 2019
AWS Washington DC Meetup


Functions to Full-Stack & Back Again


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 (, 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.


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 /
Created Apr 30, 2019
Cross-Region Replication S3 Buckets - Bash Glue
set -e
if [ -z ${STAGE_ENV+x} ]; then
echo "Missing STAGE_ENV env variable!"
exit 126
metaskills /
Created Apr 30, 2019
Cross-Region Replication S3 Buckets - Single CloudFormation Template.
aws cloudformation deploy \
--region ${AWS_DEFAULT_REGION} \
--template-file "template.yaml" \
--stack-name "my-buckets-${RAILS_ENV}" \
--s3-prefix "my-buckets-${RAILS_ENV}" \
--capabilities "CAPABILITY_IAM" \
--tags \
"env=${STAGE_ENV}" \
"group=ecommerce" \
You can’t perform that action at this time.