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 Application < Rails::Application | |
config.generators do |g| | |
g.orm :active_record | |
g.template_engine :erb | |
g.stylesheets false | |
g.javascripts false | |
g.test_framework :rspec, | |
fixtures: true, | |
view_specs: false, | |
helper_specs: false, |
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
# config/environments/production.rb | |
Rails.application.configure do | |
# Settings specified here will take precedence over those in config/application.rb. | |
config.lograge.enabled = true | |
# add time to lograge | |
config.lograge.custom_options = lambda do |event| | |
{ time: event.time, params: event.payload[:params].except('controller', 'action', 'utf8', 'authenticity_token', 'commit') } | |
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
# spec/support/database_cleaner.rb | |
RSpec.configure do |config| | |
config.before(:suite) do | |
DatabaseCleaner.clean_with(:truncation) | |
end | |
config.before(:each, js: true) do | |
DatabaseCleaner.strategy = :truncation | |
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
To find the blobs taking up the max space: | |
git rev-list --objects --all | grep "$(git verify-pack -v .git/objects/pack/*.idx | sort -k 3 -n | tail -100 | awk '{print$1}')" | |
To delete blobs from history: | |
git filter-branch -f --prune-empty --index-filter 'git rm -rf --cached --ignore-unmatch node_modules/* plugins/* platforms/* resources/ios/* resources/android/*' --tag-name-filter cat -- --all | |
git filter-branch -f --prune-empty --index-filter 'git rm -rf --cached --ignore-unmatch public/assets/*' --tag-name-filter cat -- --all |
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
# config/application.rb | |
class Application < Rails::Application | |
config.generators do |g| | |
g.orm :active_record | |
g.template_engine :erb | |
g.stylesheets false | |
g.javascripts false | |
g.test_framework :rspec, | |
fixtures: true, | |
view_specs: false, |
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
# frozen_string_literal: true | |
module ParanoiaHelper | |
extend ActiveSupport::Concern | |
module ClassMethods | |
private | |
# This method generates an instance method with the name: associated_sym.to_s.pluralize. | |
# | |
# Example: |
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
exports.config = { | |
// See http://brunch.io/#documentation for docs. | |
files: { | |
javascripts: { | |
joinTo: { | |
"js/app.js": /^(web\/static\/js)|(node_modules)/, | |
"js/ex_admin_common.js": /^(web\/static\/vendor)|(deps)/, | |
"js/admin_lte2.js": /^(web\/static\/vendor)|(deps)/, | |
"js/jquery.min.js": /^(web\/static\/vendor)|(deps)/, |
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
# ~/.railsrc | |
#--template=http://example.com/my_app_template | |
#--database=postgresql | |
--webpack | |
--database=postgresql | |
--skip-action-cable | |
#--skip-action-mailer | |
#--skip-bundle |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to make opened Markdown files always be soft wrapped: | |
# | |
# path = require 'path' | |
# atom.workspaceView.eachEditorView (editorView) -> |
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
--color | |
--order random | |
--profile | |
--backtrace | |
# --require rspec/instafail | |
# --format RSpec::Instafail | |
# --require fuubar | |
# --format Fuubar | |
# --format documentation | |
# --require rails_helper |