Skip to content

Instantly share code, notes, and snippets.

@dkniffin
dkniffin / familysearch-review-hotkeys.js
Last active May 1, 2022 13:15
Adds hotkeys for FamilySearch's Review Names tool (for the 1950 census)
const matchButton = document.querySelector("[data-testid='Match']").closest("button")
const editButton = document.querySelector("[data-testid='Edit']").closest("button")
const unsureButton = document.querySelector("[data-testid='Unsure']").closest("button")
const notAPersonButton = document.querySelector("[data-testid='Not A Person']").closest("button")
const transcriptionErrorButton = document.querySelector("[data-testid='Transcription Error']").closest("button")
document.addEventListener("keydown", (e) => {
const nameField = document.querySelector("input[name='nameField']")
if (nameField == document.activeElement) { return }
section[*section_attributes]
.container[*container_attributes]
.row
- columns.each_with_index do |column, i|
div[class=column_classes(column, i)]
= column
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'activerecord', '4.2.0'
@dkniffin
dkniffin / terminal_cheatsheet.md
Last active April 21, 2021 06:50
Terminal 101/Cheat sheet/rosetta stone

The goal of this gist is to provide a list of the most common/useful shell commands.

Commands

command stands for common usage description
man manual man display the man page for the given comand. If you're wondering how to use any command, this is the go-to place for help. It provides information about what the command does, how to use it, what flags it has, and lots more.
<command> --help While it's not an actual command, I thought it'd be useful to include it. While man will get you the most thorough information about a command, many commands don't provide man pages. Also sometimes it's useful to get a less verbose help message. In those cases, --help/-h is what you want.
<command> -h ^ see above ^
cd change directory cd move to the given directory
@dkniffin
dkniffin / capybara cheat sheet
Last active August 9, 2016 21:31 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=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_on('Link Text') # Click either a link or a button
click_on('Button Value')