Skip to content

Instantly share code, notes, and snippets.

View jonathangaldino's full-sized avatar
🏠
Working from home

Jonathan jonathangaldino

🏠
Working from home
View GitHub Profile
@jonathangaldino
jonathangaldino / rearct-native-app-in-wsl2.md
Last active May 25, 2020 16:00 — forked from bergmannjg/rearct-native-app-in-wsl2.md
Building a react native app in WSL2
@jonathangaldino
jonathangaldino / nginx.conf
Last active May 28, 2020 14:04 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@jonathangaldino
jonathangaldino / schema_dumper.rb
Created May 3, 2023 17:55 — forked from GlenCrawford/schema_dumper.rb
Patching Rails database schema dumps to support multiple PostgreSQL schemas.
# 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.
@jonathangaldino
jonathangaldino / schema_dumper.rb
Created May 3, 2023 17:56 — forked from drnic/schema_dumper.rb
Our rails db includes our own tables/schema and the Salesforce/Heroku Connect schema (under "salesforce.*"). We place this file in config/initializers/schema_dumper.rb and now our rails db:schema:dump includes both our own tables and the salesforce. tables.
# This solution was based on https://gist.github.com/GlenCrawford/16163abab7852c1bd550547f29971c18
Rails.configuration.to_prepare do
ActiveRecord::SchemaDumper.ignore_tables = %w[
salesforce._hcmeta
salesforce._sf_event_log
salesforce._trigger_log
salesforce._trigger_log_archive
]
end