This file contains 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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains 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
#!/usr/bin/env bash | |
# postfix-wrapper.sh, version 0.1.0 | |
# | |
# You cannot start postfix in some foreground mode and | |
# it's more or less important that docker doesn't kill | |
# postfix and its chilren if you stop the container. | |
# | |
# Use this script with supervisord and it will take | |
# care about starting and stopping postfix correctly. | |
# |
This file contains 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
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Swift_Mailer; | |
use \Swift_Plugins_Logger; | |
use \Swift_Plugins_LoggerPlugin; | |
class DebugMailServiceProvider extends ServiceProvider implements Swift_Plugins_Logger |
This file contains 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
/** | |
* Export all data from an IndexedDB database | |
* | |
* @param {IDBDatabase} idbDatabase The database to export from | |
* @return {Promise<string>} | |
*/ | |
export function exportToJson(idbDatabase) { | |
return new Promise((resolve, reject) => { | |
const exportObject = {} | |
if (idbDatabase.objectStoreNames.length === 0) { |
This file contains 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 TABLE orgao_expedidor( | |
id int PRIMARY KEY, | |
sigla varchar(8) NOT NULL, | |
nome varchar(128) NOT NULL, | |
tipo int NOT NULL -- 1 Orgão Federal -- 2 Orgão Regional -- 3 Orgão Municipal -- 4 Estrangeiro / Outro | |
); | |
CREATE INDEX idx_sigla ON orgao_expedidor (sigla); | |
CREATE INDEX idx_nome ON orgao_expedidor (nome) ; |
This file contains 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
ABNC - Academia Brasileira de Neurocirurgia | |
AGU - Advocacia-Geral da União | |
ANAC - Agência Nacional de Aviação Civil | |
CAER - Clube de Aeronáutica | |
CAU - Conselho de Arquitetura e Urbanismo | |
CBM - Corpo de Bombeiro Militar | |
CFA - Conselho Federal Administração | |
CFB - Conselho Federal de Biblioteconomia | |
CFBIO - Conselho Federal de Biologia | |
CFBM - Conselho Federal de Biomedicina |