Skip to content

Instantly share code, notes, and snippets.

View seanknox's full-sized avatar
🙋‍♂️

Sean Knox seanknox

🙋‍♂️
  • San Francisco, CA
View GitHub Profile
@seanknox
seanknox / gist:10688629
Created April 14, 2014 22:58
Fix for ruby with Xcode 5.1
82c82
< CONFIG["LIBRUBY_DLDFLAGS"] = "-undefineddynamic_lookup -multiply_definedsuppress -install_name $(libdir)/$(LIBRUBY_SO) -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(ruby_version) $(XLDFLAGS)"
---
> CONFIG["LIBRUBY_DLDFLAGS"] = "-undefineddynamic_lookup -multiply_defined suppress -install_name $(libdir)/$(LIBRUBY_SO) -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(ruby_version) $(XLDFLAGS)"
125c125
< CONFIG["DLDFLAGS"] = "-undefineddynamic_lookup -multiply_definedsuppress"
---
> CONFIG["DLDFLAGS"] = "-undefineddynamic_lookup -multiply_defined suppress"
@seanknox
seanknox / spec--capybara_helpers.rb
Created May 10, 2014 03:01
RSpec + Capybara + Sauce Labs + Selenium (local or remote)
module CapybaraHelpers
class << self
def local_ip
ipv4_addr_info.ip_address
end
def setup_selenium_remote
app_host ||= ENV.fetch('SELENIUM_APP_HOST', local_ip)
Capybara.server_host = app_host
Capybara.app_host = "http://#{app_host}:#{Capybara.current_session.server.port}"
### Keybase proof
I hereby claim:
* I am seanknox on github.
* I am seanknox (https://keybase.io/seanknox) on keybase.
* I have a public key whose fingerprint is F188 A721 E4A5 399E 4F2B CE49 33BF 9F24 16C4 0662
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am seanknox on github.
  • I am seanknox (https://keybase.io/seanknox) on keybase.
  • I have a public key whose fingerprint is B019 6296 2D40 9761 2660 D94D 183B D9EF C042 DB7E

To claim this, I am signing this object:

verify_plugin_signatures: false
# We ignore the following git hooks provided by overcommit for now
PostCheckout:
ALL:
enabled: false
CommitMsg:
ALL:
enabled: false
@seanknox
seanknox / npm.sublime-build
Created October 27, 2015 21:37
NPM test build definition for Sublime Text 3
{
"cmd": ["npm", "test"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"working_dir": "$project_path"
}
@seanknox
seanknox / database_setup.js
Created November 23, 2015 21:35
First attempt at tool to create/delete/reset DB using Sequelize and MySQL SQL dumps
'use strict';
const _ = require('lodash');
const Promise = require('bluebird');
const fs = require('fs');
const mysql = require('mysql');
const Sequelize = require('sequelize');
const config = require('config');
const database = config.get('database');
require 'active_support/core_ext/time/zones'
require 'reporting/report_day_in_client_time_zone'
RSpec.describe Reporting::ReportDayInClientTimeZone, :time do
let(:now) { beginning_of_yesterday + 1.day + 23.hours }
let(:beginning_of_yesterday) { client_time_zone.parse('2014-08-04') }
let(:client_time_zone) { Time.find_zone!('Melbourne') }
def stub_client_time_zone
stub_const('APP_CONFIG', double(client_time_zone: client_time_zone))
# Create a VPC to launch our instances into
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
tags {
Name = "Terraform VPC"
}
}
resource "aws_vpc_endpoint" "private_s3" {
AllCops:
Include:
- '**/Rakefile'
- '**/config.ru'
- 'lib/tasks/**/*'
Exclude:
- bin/*
- db/schema.rb
- vendor/bundle/**/*
TargetRubyVersion: 2.3