Skip to content

Instantly share code, notes, and snippets.

View giljr's full-sized avatar
💭
Full Stack Developer with a degree in Computer Engineering.

Gilberto Oliveira Jr giljr

💭
Full Stack Developer with a degree in Computer Engineering.
View GitHub Profile
@giljr
giljr / static_vs_dinamic_analyzers.md
Created November 4, 2025 16:52
Static & Dynamic Analyzers

🔍 Comparison

Type of Analysis When It Happens Examples
Static Before execution RuboCop, Brakeman, RubyCritic, bundler-audit, flake8 (Python)
Dynamic / Runtime During execution RSpec, Minitest, SimpleCov, pytest, valgrind
@giljr
giljr / ast_structure.md
Created November 2, 2025 13:47
Static vs. Dynamic Code Analysis: How RuboCop Reads Ruby's Mind
Node Meaning Example
sbegin sequence of expressions top-level script
lvasgn local variable assignment name = ...
str simple string "Gilberto"
dstr dynamic string (with interpolation) "Hello, #{name}"
send method call puts ...
Type When It Runs Example Tools What It Detects
Static Analysis Before execution RuboCop (Ruby), ESLint (JS), pylint (Python) Style issues, unused variables, bad practices, security smells
Dynamic Analysis While the program runs RSpec, pytest, valgrind Runtime errors, memory leaks, logic bugs
@giljr
giljr / xe_vs_xepdb1.md
Created November 1, 2025 22:50
Oracle OCI8 - Complete Guide(2025)
Connect To Type Use Case Rails-compatible
XE Container (CDB$ROOT) Admin / system-level
XEPDB1 Pluggable Database (PDB) App data, user schemas
@giljr
giljr / three_zips_needed_oci8.md
Created November 1, 2025 21:25
Oracle OCI8 - Complete Guide(2025)
File Description Direct label on page
instantclient-basic-linux.x64-21.13.zip Runtime libraries (required) “Basic Package (ZIP)”
instantclient-sdk-linux.x64-21.13.zip Header files for compiling ruby-oci8 “SDK Package (ZIP)”
instantclient-sqlplus-linux.x64-21.13.zip SQL*Plus CLI for testing “SQL*Plus Package (ZIP)”

Rails + Tmux + Vim Quick Commands

Sym Command Description
🆕 tmux new -t rails Create and attach a new tmux session named rails
⬆️ vim Gemfile Open the Gemfile using Vim
⬇️ :tabe spec/rails_helper.rb Open Rails configuration file in a new Vim tab
⬇️ :tabe spec/rspec_helper.rb Open RSpec configuration file in a new Vim tab
⌨️ gt Switch between open Vim tabs
⌨️ Ctrl + b, then Ctrl + Shift + % Split tmux window into right panel (side-by-side)
⌨️ Ctrl + b Move focus to the **rig
@giljr
giljr / chained_method_rspec.md
Created October 30, 2025 20:29
What are chained methods in RSpec?
Concept Meaning
Chained method A sub-method added to a custom matcher with chain
Purpose Extend matcher behavior with extra options or context
Example expect(user).to have_error_message("can't be blank").on_field(:name)
Config effect include_chain_clauses_in_custom_matcher_descriptions = true makes RSpec include .on_field(:name) in failure messages
Line Meaning
require 'spec_helper' Loads the basic RSpec configuration.
ENV['RAILS_ENV'] Ensures Rails runs in the test environment.
require_relative '../config/environment' Loads the Rails application environment.
`abort("The Rails environmen
@giljr
giljr / gitignore_RSpec_projects.md
Created October 30, 2025 15:28
vim cmds tutorial [TODO]
Category 👍 💬 Notes
Bundler & vendor /vendor/* and .bundle correctly ignored.
Environment files You’re ignoring .env and .env.* — good for security.
Logs & tempfiles Includes .keep exceptions — perfect for Rails conventions.
PID & storage dirs Very clean setup for /tmp/pids and /storage.
Public assets /public/assets is safely ignored — prevents committing precompiled assets.
Credentials `/config/maste
@giljr
giljr / rspec_helper_config.md
Last active November 4, 2025 22:11
Expainning all config from rspec_helper.rb file
Line Meaning
RSpec.configure do Opens the RSpec configuration block — all settings go inside this.
config.expect_with :rspec do Configures how expectations (expect) work.
expectations.include_..._descriptions = true Improves custom matcher messages by including chained conditions for clearer failure output.
config.mock_with :rspec do Configures RSpec’s mocking framework.