Skip to content

Instantly share code, notes, and snippets.

Ken Collins metaskills

View GitHub Profile
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 / wait_until.rb
Created Aug 26, 2011
Never sleep() using Capybara!
View wait_until.rb
# 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
click_link 'My HomeMarks'
within '#login_area' do
fill_in 'email', with: ''
fill_in 'password', with: 'test'
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 / 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 ''
gem 'imgix'
gem 'launchy'
metaskills /
Last active Nov 12, 2018
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
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'
metaskills / passenger.rb
Created Sep 18, 2015
Rails Multi-Database Best Practices Roundup - config/initializers/passenger.rb -
View passenger.rb
if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
if forked
MysqlBase.establish_connection MysqlBase.configurations['mysql'][Rails.env]
metaskills / lp.js
Last active Jan 17, 2018
LivePerson/Engage Turbolinks Hacking
View lp.js
// Assuming you put the LP init code into a function called window.lpTagCustomInit
document.addEventListener('turbolinks:before-cache', function(){
document.addEventListener('turbolinks:load', function(){
delete window.liveperson;
delete window.lpMTagConfig;
delete window.lpTag;
metaskills /
Created Jan 10, 2018
Turbolinks & jQuery ReConstructor Pattern
class Toolbar
constructor: ->
document.addEventListener 'turbolinks:before-cache', @turboBeforeCache
reConstructor: ->
registerWaypoint: ->
You can’t perform that action at this time.