For MacOS Catalina, visit Install mysql2 on MacOS Catalina
Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG | |
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT. | |
# | |
# | |
# Libraries and infrastructure | |
sudo apt update -y | |
sudo apt install -y \ | |
docker.io docker-buildx \ | |
build-essential pkg-config autoconf bison rustc cargo clang \ |
-- Carefull setup script is slow | |
-- SETUP SCRIPT :: START -- | |
DROP TABLE IF EXISTS docs; | |
CREATE TABLE docs ( | |
id SERIAL PRIMARY KEY, | |
type varchar(40) DEFAULT 'pdf' NOT NULL, | |
status varchar(40) NOT NULL, | |
sender_reference varchar(40) NOT NULL, | |
sent_at TIMESTAMPTZ, |
# Overrides Rails file activerecord/lib/active_record/schema_dumper.rb to | |
# include all schema information in the db/schema.rb file, for example, in the | |
# create_table statements. This allows for a working development database | |
# to be built from a schema.rb file generated by rake db:schema:dump. | |
# | |
# This is essentially a rebuild of the "schema_plus_multischema" gem (which is | |
# unfortunately only compatible with Rails ~> 4.2). | |
# | |
# Tested with Rails 6.0. |
CREATE ROLE owner LOGIN ENCRYPTED PASSWORD 'secret' CONNECTION LIMIT 3; | |
ALTER ROLE owner SET statement_timeout = 20000; | |
ALTER ROLE owner SET lock_timeout = 3000; | |
ALTER ROLE owner SET idle_in_transaction_session_timeout = 3000; -- v9.6+ | |
CREATE ROLE readwrite_users NOLOGIN; | |
CREATE ROLE readonly_users NOLOGIN; | |
CREATE DATABASE exampledb WITH OWNER owner ENCODING UTF8 LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8'; |
# Swift syntax highlighting for Vim | |
# Original Source: http://wingsquare.com/blog/swift-script-syntax-highlighting-and-indentation-for-vim-text-editor/ | |
# Another helpful article: https://billyto.github.io/blog/swift-syntax-vim | |
# More about Vim packages: http://vimcasts.org/episodes/packages/ | |
echo "--- creating ~/.vim/pack/bundle/start dir.." | |
mkdir -p ~/.vim/pack/bundle/start | |
echo "--- Cloning Apple's Swift repo.." |
-- Jeremy Schneider's psqlrc http://ardentperf.com | |
-- | |
-- see also https://www.citusdata.com/blog/2017/07/16/customizing-my-postgres-shell-using-psqlrc/ | |
-- | |
\set QUIET 1 | |
select case when count(*)=0 then 'select ''not-aurora'' as avers' | |
else 'select aurora_version() as avers' | |
end as aurora_version_query | |
from pg_settings where name='rds.extensions' and setting like '%aurora_stat_utils%' \gset |
For MacOS Catalina, visit Install mysql2 on MacOS Catalina
Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.
N+1 query problem
eager_load
where
preload
curl -s ipecho.net/plain
ipconfig getifaddr en0