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 / wait_until.rb
Last active Jun 7, 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.
# https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/
# 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
metaskills / command.sh
Last active May 31, 2019
Ubuntu 16.04 Install Latest FreeTDS
View command.sh
$ sudo apt-get install wget
$ sudo apt-get install build-essential
$ sudo apt-get install libc6-dev
$ wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.27.tar.gz
$ tar -xzf freetds-1.00.27.tar.gz
$ cd freetds-1.00.27
$ ./configure --prefix=/usr/local --with-tdsver=7.3
$ make
$ make install
@metaskills
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
AS
declare @mscat nvarchar(12)
select @mscat = ltrim(str(convert(int, 0x0002)))
if (@precommand is not null)
exec(@precommand)
@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 / gist:5024393
Created Feb 24, 2013
Bootstrap 2.3's mixin.less incompatibilities.
View gist:5024393
@@ -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 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 / gist:3170386
Created Jul 24, 2012
Mapping A Sass List To A Comma Separated Selector
View gist:3170386
// 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; }
View Gemfile
gem 'jekyll', '~> 2.0.0.alpha'
gem 'nokogiri'
gem 'redcarpet'
gem 'rouge'
You can’t perform that action at this time.