Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Thiago Ribeiro thiagovsk

🏠
Working from home
View GitHub Profile
@iscott
iscott / simple_authentication_rails_5_bcrypt_and_has_secure_password.md
Last active Jul 17, 2021
Cheat Sheet: Simple Authentication in Rails 5 with has_secure_password
View simple_authentication_rails_5_bcrypt_and_has_secure_password.md

Cheat Sheet: Simple Authentication in Rails 6 with has_secure_password

The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.

First the simplest/core layers, then optional layers depending on which features/functionality you want.

Specs
AUTHOR Ira Herman
LANGUAGE/STACK Ruby on Rails Version 4, 5, or 6
View passoapasso.txt
pra atualziar o changelog é
dch -m --team "New upstream release"
ou
gbp dch
para atualziar o upstream
gbp import-orig --pristine-tar --uscan
View cleanup-docker.sh
#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <(
@danopia
danopia / database.yml
Created Apr 25, 2011
Default SQLite database.yml
View database.yml
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".