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
| pg_dump database -Fc backup.dump | |
| pg_restore -l backup.dump | sed '/MATERIALIZED VIEW DATA/d' > restore.lst | |
| pg_restore -L restore.lst -d database backup.dump | |
| pg_restore -l backup.dump | grep 'MATERIALIZED VIEW DATA' > refresh.lst | |
| pg_restore -L refresh.lst -d database backup.dump |
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
| create temporary table temp (symbol varchar(255), open decimal, high decimal, low decimal, close decimal, volume varchar(255), date date ); | |
| create table if not exists stocks (id serial primary key, symbol varchar(255), open decimal, high decimal, low decimal, close decimal, volume varchar(255), date date, created_at timestamp, updated_at timestamp); | |
| copy temp (symbol, date, open, high, low, close, volume) from '/path/to/file.csv' with delimiter ',' csv header; | |
| delete from stocks using temp where stocks.date = temp.date and stocks.symbol = temp.symbol; | |
| insert into stocks (symbol, open, high, low, close, volume, date) select symbol, open, high, low, close, volume, date from temp; |
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
| /** | |
| * Parte do Projeto LUX, em desenvolvimento desde 12 de novembro de 2016. | |
| * | |
| * Contém implementação do "Cálculo da Páscoa" pelo método tabular para | |
| * datas no calendário Gregoriano, descrito em "Computus": | |
| * | |
| * https://en.wikipedia.org/wiki/Computus#Gregorian_calendar | |
| * | |
| * com adequações para o SQLite 3.7.13 ou mais recente, privilegiando o | |
| * uso de datas no padrão ISO-8601. |
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
| Rabbitmq conf locations for homebrew | |
| /usr/local/etc/rabbitmq/rabbitmq-env.conf | |
| /usr/local/etc/rabbitmq/rabbitmq |