Skip to content

Instantly share code, notes, and snippets.

View courtneyphillips's full-sized avatar

Courtney Phillips courtneyphillips

  • Datadog
  • Portland, Oregon
View GitHub Profile
@stephen-w-pracy
stephen-w-pracy / mpi.sh
Created September 17, 2024 01:46
A shell script to make placeholder images for those linked in Instruqt assignment.md files
#!/bin/bash
# Requires imagemagick. `brew install imagemagick`
# Make Placeholder Images (MPI)
find . -type f -name "assignment.md" | while read md_file; do
# Extract the directory where the current markdown file is located
dir=$(dirname "$md_file")
@Ptico
Ptico / shoulda_am.rb
Created September 22, 2011 12:41
Shoulda activemodel matchers cheatsheet
# Shoulda activemodel cheatsheet
# DB
should have_db_column(:title).of_type(:string).with_options(default: 'Untitled', null: false)
should have_db_index(:email).unique(:true)
# Associations
should belong_to :company
should have_one(:profile).dependent(:destroy)
should have_many(:posts).dependent(:nullify)
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
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('Link Text') # Click either a link or a button
click('Button Value')