This file contains hidden or 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
| namespace :db do | |
| task disconnect: :environment do | |
| ActiveRecord::Base.clear_all_connections! | |
| end | |
| desc "Run migrations from scratch (destructive!!) to validate the veracity of the versioned schema." | |
| task lint: %w[environment disconnect drop create migrate] do | |
| schema = ActiveRecord::Tasks::DatabaseTasks.schema_dump_path ActiveRecord::Base.connection_db_config | |
| sh(*%w[git diff --exit-code --], schema) do |ok, res| |
This file contains hidden or 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
| desc "Compare frontend asset builds between branches" | |
| task :diffassets, [:branch] do |t, args| | |
| sh "git diff-index --quiet HEAD --" do |ok, res| | |
| abort "Working directory not clean. Stash or commit first." unless ok | |
| end | |
| args.with_defaults(branch: "-") # git's magic for "last branch" | |
| # start in main, do clean asset build, and temporarily force-add to git | |
| sh "git switch main" |
This file contains hidden or 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
| gem "standard" | |
| gem "stripe" |
This file contains hidden or 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
| jobs: | |
| build: | |
| docker: [image: cimg/ruby:3.4.3] | |
| parallelism: 4 | |
| steps: | |
| - checkout | |
| - run: script/test spec:ci[$((${CIRCLE_NODE_INDEX}+1))/${CIRCLE_NODE_TOTAL}] |
This file contains hidden or 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
| namespace :rubocop do | |
| task :ruby do | |
| require "rubocop" | |
| config = RuboCop::ConfigStore.new.for_dir Dir.pwd | |
| target = RuboCop::TargetRuby.new(config) | |
| if Rake.application.options.trace || verbose == true | |
| rake_output_message "derived target ruby version (last wins):" | |
| rake_output_message target.class.const_get(:SOURCES).reverse.map { |s| s.new config } |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!-- OPML generated by NetNewsWire --> | |
| <opml version="1.1"> | |
| <head> | |
| <title>Subscriptions.opml</title> | |
| </head> | |
| <body> | |
| <outline text="0X404DEAD" title="0X404DEAD"> | |
| <outline text="Andy Budd" title="Andy Budd" description="" type="rss" version="RSS" htmlUrl="http://www.andybudd.com/" xmlUrl="http://www.andybudd.com/index.rdf"/> | |
| <outline text="Ben Alman » News" title="Ben Alman » News" description="" type="rss" version="RSS" htmlUrl="http://pipes.yahoo.com/pipes/pipe.info?_id=7pC7HRAi3RGGdfjlMlrX_Q" xmlUrl="http://feeds.benalman.com/benalman/"/> |
This file contains hidden or 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
| class BitInquirer | |
| def self.[](mask_map) | |
| Class.new(SimpleDelegator) do | |
| mask_map.each do |name, mask| | |
| define_method name do | |
| allbits?(mask) | |
| end | |
| end | |
| end | |
| end |
This file contains hidden or 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
| module MailerPreviewHelper | |
| extend ActiveSupport::Concern | |
| included do | |
| # Allows a mailer preview to override `params` method (either class or instance level) | |
| # to define the hash that will be passed to the mailer by default by the `preview` helper. | |
| class_attribute :params, default: {}, instance_accessor: false | |
| mailer.instance_methods(false).each do |action| | |
| define_method(action) { mailer.with(**params).send action } |
This file contains hidden or 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
| $ grep -RIho -E '\$npm_package_[_0-9a-z]*' . 2>/dev/null | sort -u | |
| $npm_package_ | |
| $npm_package_actions | |
| $npm_package_bin_brew_publish | |
| $npm_package_bin_node_build | |
| $npm_package_bin_packfiles | |
| $npm_package_bin_validate_analytics_data | |
| $npm_package_browser | |
| $npm_package_config_ | |
| $npm_package_config_app |
This file contains hidden or 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
| [ "$NODENV_COMMAND" = npx ] || return 0 | |
| remove_from_path() { | |
| local path_to_remove="$1" | |
| local path_before | |
| local result=":${PATH//\~/$HOME}:" | |
| while [ "$path_before" != "$result" ]; do | |
| path_before="$result" | |
| result="${result//:$path_to_remove:/:}" | |
| done |
NewerOlder