Для оформления сообщения коммита следует использовать следующий шаблон:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
Pry.config.history.should_save = true | |
Pry.config.history.file = File.join(__dir__, '.pry_history') |
require 'rails_helper' | |
require 'capybara/rspec' | |
require 'selenium-webdriver' | |
require 'site_prism' | |
Capybara.server = :puma, { Silent: true } | |
Capybara.server_host = `hostname`.strip.downcase | |
Capybara.server_port = 3002 | |
Capybara.default_max_wait_time = 5 |
По мотивам статьи: https://habr.com/ru/post/354282/
Сервер, естественно, должен иметь IP, не входящий в заблокированные РКН подсети. Лучше — стоять вне РФ.
Желательно обеспечить базовый уровень безопасности: https://www.linode.com/docs/security/securing-your-server/
Или заморочиться: https://www.cisecurity.org/cis-benchmarks/
# Homebrew | |
_ARCH=$(arch) | |
PROMPT="$_ARCH $PROMPT" | |
if [[ "$_ARCH" == "i386" ]]; then | |
local brew_path="/usr/local/homebrew/bin" | |
local brew_opt_path="/usr/local/homebrew/opt" | |
local nvm_path="$HOME/.nvm-x86" | |
local rbenv_path="$HOME/.rbenv-x86" | |
fi | |
if [[ "$_ARCH" == "arm64" ]]; then |
I was able to get Ruby 2.5.1 building on M1 by following two of the steps in that GH issue...
rbenv/ruby-build#1691 (comment) rbenv/ruby-build#1691 (comment)
I installed readline
and openssl
with standard brew install
.
brew install readline
brew install openssl
raise "Remove patches below in Rails 7" if Rails::VERSION::MAJOR == 7 | |
Rake::Task["db:schema:load:statistics"]&.clear | |
Rake::Task["db:_dump:statistics"]&.clear | |
Rake::Task["db:schema:dump:statistics"]&.clear | |
Rake::Task["db:test:load_schema:statistics"]&.clear | |
namespace :db do | |
namespace :schema do | |
desc "Creates a database schema file (either db/schema.rb or db/structure.sql, depending on `config.active_record.schema_format`)" | |
task dump: :load_config do |
namespace :db do | |
namespace :bloat do | |
desc 'Поиск распухших таблиц' | |
task :tables => :environment do | |
redis = Redis::Namespace.new('db:bloat') | |
connection = ActiveRecord::Base.connection | |
connection.tables.each do |table_name| | |
begin | |
rows_counted = redis.hget('tables', table_name) |
class MutationRoot < Common::GraphQL::MutationRoot | |
with_options authenticate: true do | |
field :create_direct_upload, mutation: Mutations::CreateDirectUpload | |
end | |
with_options authenticate: true, user_checks: {completed: true} do | |
field :follow_user, mutation: Mutations::FollowUser | |
field :unfollow_user, mutation: Mutations::UnfollowUser | |
end | |
end |
#!/usr/bin/env ruby | |
require 'optparse' | |
options = {} | |
opt_parser = OptionParser.new do |opt| | |
opt.banner = 'Usage: tgnotify [OPTIONS] text' | |
opt.separator '' | |
opt.separator 'CLI tool for sending notifications to Telegram' |