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' | |
require "tempfile" | |
require "fileutils" | |
base = ENV.fetch("STANDARD_UPDATE_BASE") { "$HEAD" } | |
files = `git diff #{base} --name-only --staged`.split("\n") | |
app_root = Pathname.new File.expand_path('../../', __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
%YAML 1.2 | |
--- | |
name: Ruby (Custom) | |
# TODO: unresolved issues | |
# | |
# text: | |
# "p << end | |
# print me! | |
# end" | |
# symptoms: |
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
import "my-gem" |
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 | |
# irbr (short for "IRB Recorder") | |
# | |
# Starts an IRB session and appends your history to the specified file | |
# or "scratch.rb" by default | |
# | |
# USAGE irbr.rb output.rb | |
require "irb" |
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
class SynchronousJob < ApplicationJob | |
def self.perform_later | |
raise "This job is not designed to be run asynchronously. Please use #perform_now" | |
end | |
end |
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
# lib/tasks/db_fixtures_export.rake | |
namespace 'db:fixtures' do | |
desc "generate fixtures from the current database" | |
task :export => :environment do | |
Rails.application.eager_load! | |
models = defined?(ApplicationRecord) ? ApplicationRecord.descendants : ActiveRecord::Base.descendants | |
models.each do |model| | |
puts "exporting: #{model}" |
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
<div class="modal fade" id="<%= dom_id %>" role="dialog" tabindex="-1"> | |
<div class="modal-dialog" role="document"> | |
<div class="modal-content"> | |
<% if header %> | |
<div class="modal-header"> | |
<%= header %> | |
<%- if header_close_btn %> | |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
<i class="fa fa-times-circle"></i> | |
</button> |
OlderNewer