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
KAMAL_REGISTRY_PASSWORD=dckr_pat_xXXxx_x0xXxXx-xX-XXX0xX0x-x | |
RAILS_MASTER_KEY=00x00xxx000xxx000000xx0x000x0x00 | |
POSTGRES_PASSWORD=xXxxx0xXXx0 | |
MEILI_MASTER_KEY=xXxxx0xXXx0 | |
BLAZER_DATABASE_URL=postgres://service:{POSTGRES_PASSWORD}@service-name-postgres:5432/service_production |
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
https:// { | |
log | |
tls internal { | |
on_demand | |
} | |
reverse_proxy :3000 | |
} |
the-keeper-iteration-2.mp4
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
require "json" | |
struct = { "a" => 1, "b" => 2, "c" => [1, 2, 3], "d" => [{ "e" => 3 }, nil, false, true, [], {}] } | |
source = JSON.dump(struct) | |
tokens = [] | |
index = 0 | |
until source.empty? | |
tokens << |
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
desc 'Find routes that will raise a routing error when requested' | |
task unroutable_routes: :environment do | |
# A lot of this code was taken from how `rake routes` works | |
# https://github.com/rails/rails/blob/f95c0b7e96eb36bc3efc0c5beffbb9e84ea664e4/railties/lib/rails/commands/routes/routes_command.rb | |
require 'action_dispatch/routing/inspector' | |
unroutables = Rails.application.routes.routes. | |
map { |r| ActionDispatch::Routing::RouteWrapper.new(r) }. | |
reject { |r| r.internal? || r.engine? || r.path.starts_with?('/rails/') || !r.controller }. |
- Rails 7.0.1 is compatible with Ruby 3.1.0.
- Rails 7.0.1 addes net-smtp, net-imap and net-pop gems as Action Mailbox and Action Mailer dependency, you do not need to add them explicitly in your application Gemfile anymore.
- thor 1.2.1 has been released. You will not see
DidYouMean::SPELL_CHECKERS.merge
deprecate warnings anymore.
- Use Rails 6.1.5 to support
database.yml
with aliases andsecrets.yml
with aliases.
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
-- This all starts with some functions and a *materialized* postgres view that unnests several | |
-- arrays of strings of definitions into flattened rows that are easier to search. Fun fact: | |
-- you can even create indexes on materialized views' columns! They'll refresh whenever the view | |
-- is refreshed (which in my case is every time that we pull new dictionary data from WaniKani or JMDICT | |
-- This function will take an array of strings and convert all the double-width alphanumeric characters | |
-- and normalize them as half-width. That way a search query can be massaged from "OK" to "ok" easily | |
CREATE OR REPLACE FUNCTION array_hankakufy_romaji(character varying[]) | |
RETURNS character varying[] | |
AS |
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
%YAML 1.2 | |
--- | |
name: Ruby (Custom) | |
# TODO: unresolved issues | |
# | |
# text: | |
# "p << end | |
# print me! | |
# end" | |
# symptoms: |
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
# STEP 1: Enable Virtual Machine Platform feature | |
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
# STEP 2: Enable WSL feature | |
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
# STEP 3: Restart Win 10 Machine | |
# STEP 4: To set the WSL default version to 2. | |
# Any distribution installed after this, would run on WSL 2 |
NewerOlder