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 |
RSpec.configure do |config| | |
example_sql_counts = Hash.new(0) | |
config.around(:example) do |procsy| | |
sql_count = 0 | |
callback = ->(*args) { sql_count +=1 } | |
ActiveSupport::Notifications.subscribed(callback, "sql.active_record") do | |
procsy.call | |
end |
FROM ruby:2.6.5-alpine | |
RUN apk add --update --no-cache bash build-base nodejs sqlite-dev tzdata postgresql-dev yarn | |
RUN gem install bundler:2.1.4 | |
WORKDIR /usr/src/app | |
COPY package.json yarn.lock ./ | |
RUN yarn install --check-files |
FOREWORDS
I don't mean the snippet at the bottom of this gist to be a generic plug-n-play solution to your search needs. It is very likely to not work for you or even break things, and it certainly is not as extensively tested and genericised as your regular third-party plugin.
My goal, here and in most of my posts, is to show how Vim's features can be leveraged to build your own high-level, low-maintenance, workflows without systematically jumping on the plugins bandwagon or twisting Vim's arm.
#!/bin/bash | |
# Built off of Standard JS's pre-commit example: https://standardjs.com/#is-there-a-git-pre-commit-hook | |
# Ensure all files staged for commit pass standard code style | |
function xargs-r() { | |
# Portable version of "xargs -r". The -r flag is a GNU extension that | |
# prevents xargs from running if there are no input files | |
if IFS= read -r -d $'\n' path; then | |
{ echo "$path"; cat; } | xargs $@ |
$ rails new my-i8n --webpack
Gemfile
gem 'i18n-js'
What people refer to as a "macro" is often actually a "recording".
You press qa
to start recording your commands into register a
, you do your thing, you stop your recording with q
, and you play that recording back with @a
.
Yes, what you just recorded is a macro, but macros are not necessarily recorded or even stored in registers.
# Add to `spec/support/database_state_loader.rb` | |
class DatabaseStateLoader | |
class EnvironmentError < RuntimeError; end | |
def self.load(path) | |
new(path).load | |
end | |
def initialize(path) |