This file contains hidden or 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://www.youtube.com/watch?v=4rin1enhuQQ | |
| def flippling_matrix(matrix) | |
| n = matrix.size | |
| sum = 0 | |
| (0...n / 2).each do |i| | |
| (0...n / 2).each do |j| | |
| puts "[#{i}][#{j}] => [#{i}][#{n - j - 1}] => [#{n - i - 1}][#{j}] => [#{n - i - 1}][#{n - j - 1}]" | |
| sum += [matrix[i][j], matrix[i][n - j - 1], matrix[n - i - 1][j], matrix[n - i - 1][n - j - 1]].max |
This file contains hidden or 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
| select distinct city from station where id % 2 = 0; // even | |
| select distinct city from station where mod(id, 2) = 0; // even | |
| select distinct city from station where id % 2 <> 0; // odd | |
| // City Min and Max length alfabeticaly ordered. | |
| select city, LENGTH(city) from station | |
| where LENGTH(city) = (select MIN(LENGTH(city)) from station) | |
| order by city limit 1; | |
| select city, LENGTH(city) from station | |
| where LENGTH(city) = (select MAX(LENGTH(city)) from station) |
This file contains hidden or 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
| # frozen_string_literal: true | |
| require 'bigdecimal/util' | |
| # == testing lib == | |
| class UnitTest | |
| def self.call | |
| tests = public_instance_methods.select do |method| | |
| method.to_s.start_with?('test_') | |
| end |
This file contains hidden or 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
| #config/environments/development.rb | |
| config.action_mailer.asset_host = 'http://localhost:3000' | |
| config.action_mailer.delivery_method = :resend | |
| config.action_mailer.resend_settings = { | |
| api_key: 're_SECRET_HERE', | |
| } | |
| #app/mailers/user_mailer.rb | |
| class UserMailer < ApplicationMailer | |
| default from: 'onboarding@resend.dev' |
This file contains hidden or 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
| { | |
| "editor.bracketPairColorization.enabled": true, | |
| "editor.guides.bracketPairs": "active", | |
| "editor.fontLigatures": true, | |
| "editor.formatOnSave": true, | |
| "editor.formatOnPaste": true, | |
| "editor.formatOnType": true, | |
| "editor.codeActionsOnSave": { | |
| "source.fixAll.eslint": true, | |
| "source.organizeImports": true |
This file contains hidden or 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.exports = { | |
| moduleFileExtensions: [ | |
| 'js', | |
| 'jsx', | |
| 'json', | |
| 'vue', | |
| ], | |
| transform: { | |
| '^.+\\.vue$': 'vue-jest', | |
| '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub', |