Web MQTT com RabbitMQ

Arquivo de configuração rabbitmq.conf loopback_users.guest = falselisteners.tcp.default = 5672management.listener.port = 15672# management.listener.ssl = truemanagement.ssl.port = 15671management.ssl.cacertfile = /etc/rabbitmq/cacert.pemmanagement.ssl.certfile = /etc/rabbitmq/cert.pemmanagement.ssl.keyfile = /etc/rabbitmq/key.pem# Certificados…

Descobrindo Primary Key de todas as tabelas no PostgreSQL

select kcu.table_schema, kcu.table_name, tco.constraint_name, kcu.ordinal_position as position, kcu.column_name as key_columnfrom information_schema.table_constraints tcojoin information_schema.key_column_usage kcu on kcu.constraint_name = tco.constraint_name and kcu.constraint_schema = tco.constraint_schemawhere tco.constraint_type…

Ffmpeg Cheatsheet

Split video without transcoding ffmpeg -i INFILE.mp4 -vcodec copy -acodec copy -ss 00:01:00.000 -t 00:00:10.000 OUTFILE.mp4 Rotate video Example "D:\ProgramasPortable\Media Softwares\ffmpeg-4.1.1-win64-static\bin\ffmpeg.exe" -i "S:\VID_20200307_213049.mp4"…

Fazendo log de queries no PostgreSQL

ALTER DATABASE your_database_nameSET log_statement = 'all';// https://stackoverflow.com/questions/722221/how-to-log-postgresql-queriesSELECT set_config('log_statement', 'all', true); postgresql.conf#log_directory = 'pg_log' to log_directory = 'pg_log'#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' to log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'#log_statement…