Skip to content

Instantly share code, notes, and snippets.

View sosolidkk's full-sized avatar
💻
Working from home!

João Pedro sosolidkk

💻
Working from home!
View GitHub Profile
@sosolidkk
sosolidkk / backdoor.rb
Last active November 17, 2023 20:09
Devise Middleware Backdoor
module Middlewares
# Middleware which allows signing in by passing as=USER_ID in a query
# parameter.
#
# Designed to eliminate time in integration tests wasted by visiting and
# submitting the sign in form.
#
# This code snippet is heavily inspired by and based on the Toughtbot Clearance gem Backdoor
# For more details, see the source code here:
# https://github.com/thoughtbot/clearance/blob/main/lib/clearance/back_door.rb
@sosolidkk
sosolidkk / git.md
Created July 31, 2020 17:13 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@sosolidkk
sosolidkk / sigaa_date_parser.py
Created February 16, 2020 17:58
Gist para fazer parse da data que existe no Sigaa para um padrão mais entendível
days = {"2": "Seg", "3": "Ter", "4": "Qua", "5": "Qui", "6": "Sex", "7": "Sab"}
shift = {"m": "Manhã", "t": "Tarde", "n": "Noite"}
time = {
"m": {
"12": "06:00 às 08:00",
"34": "08:00 às 10:00",
"56": "10:00 às 12:00",
"3456": "08:00 às 12:00",
},
"t": {