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") |
| brew --prefix zlib | |
| brew --prefix [email protected] | |
| brew --prefix libyaml | |
| /usr/local/Cellar/zlib/1.2.11 | |
| /usr/local/opt/[email protected] | |
| /usr/local/opt/libyaml | |
| ➜ fpr git:(master) ✗ | |
| export CFLAGS="-Wno-error=implicit-function-declaration" |
| [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)"| $ git tag --sort=taggerdate | |
| $ git tag --sort=-taggerdate |
| $ ffmpeg -i input.mp4 -vcodec h264 -acodec mp3 output.mp4 | |
| $ ffmpeg -i input -c:v libx265 -acodec aac output.mp4 | |
| $ ffmpeg -i input -c:v libx265 -c:a copy output.mp4 |