Skip to content

Instantly share code, notes, and snippets.

View scottwillson's full-sized avatar

Scott Willson scottwillson

View GitHub Profile
Promise.resolve().then(v => {
console.log('everything is fine');
throw new Error();
}).then(e => {
console.log('after error');
});
Promise.resolve().then(v => {
console.log('everything is fine 2');
throw new Error();
@scottwillson
scottwillson / flagged-list-diffs.txt
Last active May 15, 2019 18:16
Flagged list response
redis srv app result
---- --- --- ------
add x [add x] [] [x]
add [add] [x] [x] or [x, x]?
add, add [add] [] [x]
add, add [add] [x] [x] or [x, x]?
@scottwillson
scottwillson / application_system_test_case.rb
Created May 11, 2020 16:19
Rails 6 system test download directory
require "test_helper"
# Send downloads to tmp/capybara/downloads so they can be reliably checked and cleaned up
# without polluting ~/Downloads.
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :selenium, using: :headless_chrome, screen_size: [1400, 1400] do |driver_option|
driver_option.add_preference(
:download,
default_directory: Rails.root.join("tmp/capybara/downloads")
)