This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
ERB template chunk from The Feed's display of emails: | |
<section class="postings postings--feed-style" id="postings" | |
data-controller="pagination" data-pagination-root-margin-value="40px"> | |
<%= render partial: "postings/snippet", collection: @page.records, as: :posting, cached: true %> | |
<%= link_to(spinner_tag, url_for(page: @page.next_param), | |
class: "pagination-link", data: { pagination_target: "nextPageLink", preload: @page.first? }) unless @page.last? %> | |
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stick this in your home directory and point your Global Git config at it by running: | |
# | |
# $ git config --global core.attributesfile ~/.gitattributes | |
# | |
# See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details | |
*.c diff=cpp | |
*.h diff=cpp | |
*.c++ diff=cpp | |
*.h++ diff=cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
branch=$( git branch | tr -d '*' | grep $1 ) | |
current_branch() { | |
echo $(git rev-parse --abbrev-ref HEAD) | |
} | |
starting_branch=$(current_branch) | |
# This function lists all branches with an index (starting at 1) | |
list_all_branches() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'pathname' | |
# path to your application root. | |
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) | |
Dir.chdir APP_ROOT do | |
# This script is a starting point to setup your application. | |
# Add necessary setup steps to this file: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# This pre-commit hook aims to prevent you from *accidentally* committing debugger | |
# statements if installed in your project. You can force a commit if necessary with: | |
# `git commit --no-verify`. | |
# Install by copying it to <your-project-dir>/.git/hooks/pre-commit' | |
hits = [] | |
rb_debuggers = ['binding\.pry', 'binding\.remote_pry', 'debugger', 'focus: true', ':focus => true', 'save_and_open_page', 'save_and_open_screenshot'] | |
js_debuggers = ['console\.log', 'debugger'] |