Skip to content

Instantly share code, notes, and snippets.

View etagwerker's full-sized avatar
🏠
Working from home

Ernesto Tagwerker etagwerker

🏠
Working from home
View GitHub Profile
# rails/rails rubycritic v4.10 analysis
New critique at file:////Users/etagwerker/Projects/rails/rails/tmp/rubycritic/overview.html
Score: 65.77
rubycritic . 587.71s user 1356.37s system 57% cpu 56:28.03 total
# rails/rails rubycritic v4.11 analysis
New critique at file:////Users/etagwerker/Projects/rails/rails/tmp/rubycritic/overview.html
Score: 65.77
# step 1
gem uninstall rubycritic
gem install rubycritic -v=4.10.0
time rubycritic app lib
# step 2
gem uninstall rubycritic
gem install rubycritic -v=4.11.0
➜ checker git:(fixes/issue-8) bundle exec rake spec
/Users/etagwerker/.rbenv/versions/3.1.7/bin/ruby -I/Users/etagwerker/.rbenv/versions/3.1.7/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.5/lib:/Users/etagwerker/.rbenv/versions/3.1.7/lib/ruby/gems/3.1.0/gems/rspec-support-3.13.4/lib /Users/etagwerker/.rbenv/versions/3.1.7/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.5/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
Checking compatibility:
Rails version 999.9.9
Dependencies: {"cronex"=>">= 0.13.0", "fugit"=>"~> 1.8", "globalid"=>">= 1.0.1", "sidekiq"=>">= 6"}
Checking with temporary Gemfile:
source 'https://rubygems.org'
gem 'rails', '999.9.9'
@etagwerker
etagwerker / gist:bc227cd1107a67483c4fe736bcd84c94
Created December 19, 2024 22:23
rake stats with rails_stats v2.0
➜ fastruby.io git:(main) ✗ bundle exec rake stats
The dependency `tzinfo-data` wasn't found. It may not be present in your Gemfile.lock. This often happens when a dependency isn't installed on your platform.
The dependency `tzinfo-data` wasn't found. It may not be present in your Gemfile.lock. This often happens when a dependency isn't installed on your platform.
+------------------------------------|------------|----------------+
| Name | Total Deps | 1st Level Deps |
+------------------------------------|------------|----------------+
| ombu_labs-auth | 70 | 5 |
| administrate-field-active_storage | 59 | 2 |
| ombu_labs-hubspot | 55 | 3 |
| ombu_labs-notifications | 50 | 3 |
# lib/rubocop/cop/rails/use_find_each.rb
module RuboCop
module Cop
module Rails
# This cop checks for usage of `all.each`.
#
# @example
# # bad
# Model.all.each do |record|
# # do something
@etagwerker
etagwerker / list-of-tech-debt-tools.md
Last active December 17, 2024 20:22
list-of-tech-debt-tools.md
  1. Cloc
  2. npm
  3. yarn
  4. RubyCritic
  5. code-complexity
  6. Code Climate
  7. bundler
  8. bundler-audit
  9. bundler-stats
  10. SimpleCov
noahgibbs:
display_name: "Noah Gibbs"
gravatar: 5e8107f48d4471a40de325151d589b6d
twitter: codefolio
github: noahgibbs
bio: "An old programmer who moved from the US to Scotland. Noah writes about Ruby and Rails performance in many places. Also wrote Rebuilding Rails and Mastering Software Technique."
---
layout: post
title: "Optimizing Images - Part 1"
date: 2022-11-21 12:00:00
categories: ["performance"]
author: arieljuod
description: "Serving non-optimized images can make our site feel slow. Here are some techniques to speed things up."
image: "optimizing-images-part-1.jpg"
---
Is your Ruby app slow? @FastRubyIO has partnered with @nateberkopec to help you identify optimization opportunities with their Tune Report: https://go.fastruby.io/vim
#CodeAudit #PerformanceOptimization #RubyOnRails #Ruby
@etagwerker
etagwerker / Gemfile
Created October 18, 2022 13:24
Example of using next_rails just for a Ruby dual boot
# Gemfile
def next?
File.basename(__FILE__) == Gemfile.next
end
if next?
ruby "3.1.1"
else
ruby "3.0.1"