Skip to content

Instantly share code, notes, and snippets.

@jfroom
jfroom / list.md
Last active February 20, 2024 23:27
List of Front-end Job Interview Questions & Take Home Assignments / Tests / Homework
@jfroom
jfroom / 1-Dockerfile
Created March 15, 2017 22:03
DC-Bundler
FROM ruby:2.3-slim
RUN apt-get update && apt-get install -qq -y --no-install-recommends build-essential
# Ensure that our apt package list is updated and has basic build packages.
RUN mkdir -p /app
WORKDIR /app
COPY . .
# Add app files into docker image
@jfroom
jfroom / 1-Dockerfile
Last active March 15, 2017 20:48
DC-Selenium
# ./Dockerfile
FROM ruby:2.3-slim
RUN apt-get update && apt-get install -qq -y --no-install-recommends \
build-essential nodejs
# Ensure that our apt package list is updated and install a few
# packages to ensure that we can compile assets (nodejs).
RUN mkdir -p /app
@jfroom
jfroom / test.rb
Last active March 16, 2017 17:47
capybara selenium ':nth-of-type' selector
# Notice use of ':nth-of-type(idx)' in combination with has_css?(css, text: '...').
# Similar to a jquery equivalent of $('td:eq(3)').
# Notice it's a 1 based index for :nth-of-type (not 0).
# In the past I think we were comparing element.text == '...' when iterating/targeting a css index like a specific TD.
# The advantage here is a leveraging capybara's built in 'wait'.
# https://github.com/teamcapybara/capybara/issues/1109
# Gems
# - selenium-webdriver (3.0.7)
# - capybara (2.12.0)
# - nokogiri (>= 1.3.3)