Skip to content

Instantly share code, notes, and snippets.

View lucianghinda's full-sized avatar

Lucian Ghinda lucianghinda

View GitHub Profile
@lucianghinda
lucianghinda / parser.rb
Created January 8, 2024 09:55
Gemfile parser with Prism
# frozen_string_literal: true
require "prism"
module RubyGems
module GemList
class Parser
def initialize(list, rubygems_client: RubyGems::Client.new)
@list = list
@rubygems_client = rubygems_client
@lucianghinda
lucianghinda / api_response.rb
Created March 30, 2024 18:16
Mastodon Client
module Mastodon
ApiResponse = Data.define(:body, :headers, :code, :links)
end
@lucianghinda
lucianghinda / compare.rb
Created October 5, 2024 15:31
Compare Substack exported subscribers with Beehiiv exported subscribers
require 'csv'
require 'time'
require 'set'
class Diff
MissingData = Data.define(:rows, :headers)
def initialize(source_file:, second_file:)
@source_file = source_file
@second_file = second_file
@lucianghinda
lucianghinda / benchmark-instance-variables-vs-private-getters.rb
Created April 23, 2025 14:26
Ruby - Benchmark Instance Variable vs Private Getters Access
require 'benchmark'
require 'benchmark/ips'
class TestClass
def initialize
@value = "test value"
end
def direct_access
@value
@lucianghinda
lucianghinda / tasks.md
Created September 2, 2025 10:38
Add Avo to Rails app - example of tasks for Claude Code or Gemini CLI

6. Avo Admin Interface Configuration

  • 6.1. Add Avo gem to Gemfile and run bundle install
  • 6.2. Generate Avo configuration and initialize admin interface
  • 6.3. Configure Avo resource for Authors with all social media fields
  • 6.4. Configure Avo resource for Categories with hierarchical relationship management
  • 6.5. Configure Avo resource for Tags with usage count display
  • 6.6. Configure Avo resource for Resources with comprehensive field management
  • 6.7. Configure Avo resource for ResourceRatings with moderation capabilities
  • 6.8. Set up Avo filters for resource type, difficulty level, and status