Skip to content

Instantly share code, notes, and snippets.

View felipejpc's full-sized avatar

FelipeJPC felipejpc

View GitHub Profile
@felipejpc
felipejpc / git_tag.txt
Last active April 6, 2023 13:12 — forked from danielestevez/gist:2044589
Git - Working with tags
1) Commit everything you need to a branch and then create a new annotated tag locally
git tag -a v0.1.0 -m "Primeira Versão de Produção Release v0.1.0"
2) Push the tag to remote
git push origin v0.1.0
3) When needed to fix something on tag delete the tag locally and commit everything necessary
git tag -d v0.1.0
3.1) Recreate the tag (step 1)
@felipejpc
felipejpc / nginx-config-auth-cert-ssl.md
Created March 25, 2021 14:49 — forked from alexishida/nginx-config-auth-cert-ssl.md
Tutorial to configure Nginx client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Original: https://gist.github.com/mtigas/952344

Convert SSL certificate from CRT format to PEM

openssl x509 -in server.crt -out server.der -outform DER
openssl x509 -in server.der -inform DER -out server.pem -outform PEM
@felipejpc
felipejpc / rubocop_cheatsheet.md
Last active May 12, 2020 12:46
Rubocop Cheat Sheet
@felipejpc
felipejpc / rbenv_cheatsheet.md
Last active April 6, 2021 00:28
Rbenv Cheat Sheet

Installing Rbenv

To set up rbenv follow this tutorial from digitalocean.

Rbenv Commands

Managing versions

List only latest stable releases for each Ruby implementation

$ rbenv install -l
@felipejpc
felipejpc / git_cheatsheet.md
Last active September 1, 2020 23:00 — forked from hofmannsven/README.md
Git Cheat Sheet
@felipejpc
felipejpc / testing_rails_apps_models.md
Last active September 11, 2023 19:13
Testing Rails Apps - Models

This is a skeleton for testing rails models including best practices and examples of validations, callbacks, scopes, instance & class methods, associations, and more.

This skeleton also assumes you're using the following gems:

@felipejpc
felipejpc / postgresql_cheatsheet.md
Last active January 5, 2021 17:16
PostgreSQL Cheat Sheet
Switching over linux users to the postgres account and access a postgres prompt

$ sudo su - postgres or $ sudo -i -u postgres then $ psql

Accessing a postgres prompt without switching accounts

$ sudo -u postgres psql or

@felipejpc
felipejpc / installing_postgresql.md
Last active January 4, 2022 19:37
Installing PostgreSQL and PGAdmin4 on Ubuntu 18.04