Skip to content

Instantly share code, notes, and snippets.

View karlentwistle's full-sized avatar

Karl Entwistle karlentwistle

View GitHub Profile
Failures:
1) Marketplace User with a pro account edits an existing listing that they created
Got 0 failures and 2 other errors:
1.1) Failure/Error: click_link "Edit this Marketplace Ad"
Capybara::ElementNotFound:
Unable to find link "Edit this Marketplace Ad"
# ./vendor/bundle/ruby/2.7.0/gems/capybara-3.36.0/lib/capybara/node/finders.rb:303:in `block in synced_resolve'
@karlentwistle
karlentwistle / alias_matchers.md
Created March 7, 2017 22:19 — forked from JunichiIto/alias_matchers.md
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
".tags*",
"*.pyc",
"*.pyo",
require 'rspec'
module Negator
def negate(method_name, as:)
if instance_methods.include?(method_name)
define_method(as) do
!send(method_name)
end
end
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@karlentwistle
karlentwistle / Yosemite Hackintosh | Gigabyte Z87N | Intel Core i7 i7-4790K | Gigabyte - GeForce GTX 780.md
Last active August 29, 2015 14:07
Yosemite Hackintosh - Gigabyte Z87N / Intel Core i7 i7-4790K / Gigabyte GeForce GTX 780

The Build

  • Gigabyte Z87N-WIFI
  • Intel Core i7 i7-4790K
  • Gigabyte GeForce GTX 780

BIOS

To access BIOS/UEFI Setup, press and hold Delete on a USB Keyboard while the system is booting up

  • Load Optimized Defaults
  • Disable Secure Boot Mode
  • Set OS Type to Other OS
#include <Process.h>
void setup() // run once, when the sketch starts
{
Bridge.begin();
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
@karlentwistle
karlentwistle / TryStatic
Created August 11, 2014 09:02
Very Simple Rack TryStatic
require 'rack'
class MyApp
def call env
[200, {"Content-Type" => "text/html"}, ["Hello Rack Participants"]]
end
end
class TryStatic
class Event < ActiveRecord::Base
has_many :artists
end
class Artist < ActiveRecord::Base
def self.make_me_an_artist
create! do |artist|

Heroku SSL Endpoint

Assumptions:

  • You want to enable SSL for your domain.
  • You want to go with RapidSSL.
  • Your domain name is www.domain.com during this example.
  • You want to encrypt requests for a single domain (no wildcard)
  • You want to apply this certificate to Heroku's SSL Endpoint