Skip to content

Instantly share code, notes, and snippets.

View existentialmutt's full-sized avatar

Rafe Rosen existentialmutt

View GitHub Profile
@existentialmutt
existentialmutt / README.md
Last active July 4, 2021 00:35 — forked from leastbad/README.md
mrujs w/ cable-car plugin

"dependencies": { "cable_ready": "TBD", "mrujs": "TBD" }

@existentialmutt
existentialmutt / db_fixtures_export.rake
Last active March 25, 2023 21:10 — forked from kuboon/db_fixtures_export.rake
Generate fixtures from db. Readable by rake db:fixtures:load
# 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}"
@existentialmutt
existentialmutt / rails.cap
Last active December 6, 2016 18:16 — forked from joost/deploy.rb
Capistrano 3 rails console tasks and log tailing tasks
# Place in lib/capistrano/tasks/rails.cap and require it in your Capfile
# See: https://gist.github.com/existentialmutt/c904d6e55cd09dda81ea9751d2e66e6d
# Adapted to work with RVM installed to /usr/local
namespace :rails do
desc "tail rails logs"
task :tail_logs do
on roles(:app) do
execute "tail -f #{shared_path}/log/#{fetch(:rails_env)}.log"
end
end