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
# Usage: | |
# ruby credentials_decryptor.rb production.yml.enc production.key | |
require 'openssl' | |
require 'base64' | |
# References: | |
# - https://github.com/rails/rails/blob/main/activesupport/lib/active_support/encrypted_file.rb | |
# - https://github.com/rails/rails/blob/b71a9ccce04ac08e159d4a21de91a8d76f13d8d0/activesupport/lib/active_support/message_encryptor.rb#L147 |
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
VPS_DOMAIN="$(hostname --fqdn)" # changme: use your domain name | |
# Install DO agent | |
curl -sSL https://agent.digitalocean.com/install.sh | sh | |
# Update dist packages | |
apt-get update | |
apt-get dist-upgrade -y | |
# Install packages neccessary to compile stuff |
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
Using postgresql | |
-- create_table(:companies, {:force=>true}) | |
-> 0.0075s | |
-- create_table(:developers, {:force=>true}) | |
-> 0.0077s | |
-- create_table(:groups, {:force=>true}) | |
-> 0.0066s | |
-- create_table(:contract, {:force=>true}) | |
-> 0.0157s | |
Calculating ------------------------------------- |
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
# Drop this file to activerecord/test | |
# Set adapter in 'config.yml' (e.g. "adapter: mysql2") | |
# bundle exec ruby -Itest test/where_exists_benchmark.rb | |
require 'cases/helper' | |
require 'benchmark/ips' | |
RECORDS = 1000 | |
COHERENCE = 35 |