Skip to content

Instantly share code, notes, and snippets.

View f-moya's full-sized avatar
:shipit:

Federico Moyá f-moya

:shipit:
View GitHub Profile
@f-moya
f-moya / 2-using-gpg.md
Last active August 16, 2025 14:50 — forked from troyfontaine/1-setup.md
Signing your Git Commits on MacOS

Using GPG

Step 1: Install software

We use the Homebrew package manager for this step.

brew install gpg2 gnupg pinentry-mac       

Step 2: Create the .gnupg Directory

If this directory does not exist, create it. EDIT: June 2022 - Fixes single quotes to allow expansion of the subshell

@f-moya
f-moya / rules for good testing.md
Last active December 29, 2024 02:53 — forked from Integralist/rules for good testing.md
Sandi Metz advice for writing tests

Sandi Metz advice for writing tests

Look at the following image...

...it shows an object being tested.

You can't see inside the object. All you can do is send it messages. This is an important point to make because we should be "testing the interface, and NOT the implementation" - doing so will allow us to change the implementation without causing our tests to break.

Arel Cheatsheet on Steroids

A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.

Tables

posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord

Table alias