ActiveStorage::VariantRecord.find_each(&:destroy)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sqidsable | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def find(*ids) | |
expects_array = ids.first.is_a?(Array) | |
uniq_ids = ids.flatten.compact.uniq | |
uniq_ids = uniq_ids.first unless expects_array || uniq_ids.size > 1 |
db:migrate
: runs migrationsdb:create
: creates the databasedb:drop
: deletes the databasedb:schema:load
: create tables using schema.rb and deleting existing datadb:setup
: doesdb:create
,db:schema:load
,db:seed
db:reset
: doesdb:drop
,db:create
,db:schema:load
,db:seed
db:migrate:reset
: doesdb:drop
,db:create
,db:migrate
db:prepare
: doesdb:setup
if database does not exists anddb:migrate
if existsdb:seed
: load seed fromdb/seeds.rb
db:seed:replant
: truncate tables and doesdb:seed
aasm column: :status do
state :pending, initial: true
state :running, :completed, :failed
event :start, success: :success_event_start, after: :after_event_start, after_commit: :after_commit_event_start do
transitions from: :pending, to: :running,
after: :after_transition_from_pending_to_running,
success: :success_transition_from_pending_to_running
end
Por defecto en Ubuntu, cuando instalamos openssh-server
se generan 4 claves públicas con sus correspondientes
claves privadas usando cada una un algoritmo diferente:
/etc/sshd/ssh_host_dsa_key.pub
- ssh-dss/etc/sshd/ssh_host_ecdsa_key.pub
- ecdsa-sha2-nistp256/etc/sshd/ssh_host_ed25519_key.pub
- ssh-ed25519/etc/sshd/ssh_host_rsa_key.pub
- ssh-rsa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use with Ubuntu 22.04 jammy | |
# Prepare system | |
sudo apt update | |
sudo apt upgrade -y | |
# install docker |
NewerOlder