Skip to content

Instantly share code, notes, and snippets.

View Pauloparakleto's full-sized avatar

Paulo Felipe Souza Pauloparakleto

View GitHub Profile
@Pauloparakleto
Pauloparakleto / stimulus_notes.md
Created May 16, 2025 03:17 — forked from tvandervossen/stimulus_notes.md
Quick guide to add stimulus.js to a Rails 5.2 app if you haven’t used much Modern ™ JavaScript before

Add stimulus.js to a Rails 5.2 app

According to https://github.com/rails/webpacker you should:

Add the webpacker gem to your Gemfile:

# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker'

Then run (assuming you’re on macOS and using Homebrew):

@Pauloparakleto
Pauloparakleto / class_var_ex.rb
Created July 22, 2022 13:55 — forked from sumanmukherjee03/class_var_ex.rb
Messing with class variables in ruby
# Execute this file as follows and compare the results in ruby 1.8.*:
#
# ruby class_var_ex.rb
# ruby class_var_ex.rb "include module"
# ruby class_var_ex.rb "include module" "include global"
# ruby "include global"
@@test = 9 if ARGV.last == "include global"
module X