Installing mysql2 gem errors on MacOS Catalina with MySQL 5.7.
Make sure openssl is installed on Mac via Homebrew.
brew install openssl
| # frozen_string_literal: true | |
| ############################################################################################### | |
| # WHAT I SERIALIZE? # | |
| ############################################################################################### | |
| # This scrip can help you to find what object types you need to witelist after CVE-2022-32224 update | |
| # AD: If you using StimulusJS then checkout my gem stimulus_tag_helper | |
| # https://rubygems.org/gems/stimulus_tag_helper | |
| # https://github.com/crawler/stimulus_tag_helper |
| <!-- solution 1, 117b, inspired by http://www.p01.org/releases/140bytes_music_softSynth/ --> | |
| <button onclick="new Audio('data:audio/wav;base64,UklGRl9vT19XQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YU'+Array(1e3).join(123)).play()">Beep</button> | |
| <!-- Solution 2, 107b, inspired by http://xem.github.io/chip8/c8.html --> | |
| <button onclick="o=(A=new AudioContext()).createOscillator();o.connect(A.destination);o.start(0);setTimeout('o.stop(0)',500)">Boop</button> |
| http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
| http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
| #payload: [{"kind"=>"person"}] | |
| Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
| #data: {"interest"=>["music", "movies", "programming"]} | |
| Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
| Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
| Segment.where("jsonb_array_length(data->'interest') > 1") |
| [client] | |
| port = 3306 | |
| socket = /var/run/mysqld/mysqld.sock | |
| # This was formally known as [safe_mysqld]. Both versions are currently parsed. | |
| [mysqld_safe] | |
| socket = /var/run/mysqld/mysqld.sock | |
| nice = 0 | |
| syslog |
| <% | |
| require 'cgi' | |
| require 'uri' | |
| begin | |
| uri = URI.parse(ENV["DATABASE_URL"]) | |
| rescue URI::InvalidURIError | |
| raise "Invalid DATABASE_URL" | |
| end |
This is a fork of original gist https://gist.github.com/operatino/392614486ce4421063b9dece4dfe6c21, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).
This procedure explains how to install MySQL using Homebrew on macOS (Catalina 10.15 and up)
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"| #!/usr/bin/env ruby | |
| require 'english' | |
| require 'rubocop' | |
| ADDED_OR_MODIFIED = /A|AM|^M/.freeze | |
| changed_files = `git status --porcelain`.split(/\n/). | |
| select { |file_name_with_status| | |
| file_name_with_status =~ ADDED_OR_MODIFIED |
| # Русский перевод для https://github.com/plataformatec/devise/tree/v3.2.4 | |
| # Другие переводы на http://github.com/plataformatec/devise/wiki/I18n | |
| ru: | |
| devise: | |
| confirmations: | |
| confirmed: "Ваша учётная запись подтверждена." | |
| send_instructions: "В течение нескольких минут Вы получите письмо с инструкциями по подтверждению Вашей учётной записи." | |
| send_paranoid_instructions: "Если Ваш адрес email есть в нашей базе данных, то в течение нескольких минут Вы получите письмо с инструкциями по подтверждению вашей учётной записи." | |
| failure: |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |