Execute os procedimentos abaixo para habilitar SSL no seu servidor PostgreSQL.
- Crie um diretório para armazenar as configurações (opcional)
mkdir certificados
cd certificados
#!/bin/bash | |
ARCHIVEDIR='/var/lib/pgsql/wal_archive' | |
LAST_BACKUP=$(ls -lto ${ARCHIVEDIR}) | |
FILE_LIST=$(pg_archivecleanup -n "${ARCHIVEDIR}" "${LAST_BACKUP}") | |
## TEST FIRST | |
pg_archivecleanup -n "${ARCHIVEDIR}" "${LAST_BACKUP}" | find -type f -mmin +30 | xargs ls -lh |
I hereby claim:
To claim this, I am signing this object:
-- http://blog.jooq.org/2013/11/19/how-to-create-a-range-from-1-to-10-in-sql/ | |
IF EXISTS (SELECT * | |
FROM dbo.sysobjects | |
WHERE id = object_id (N'[dbo].[generate_series]') | |
AND OBJECTPROPERTY(id, N'IsTableFunction') = 1) | |
DROP FUNCTION [dbo].[generate_series] | |
GO | |
CREATE FUNCTION [dbo].[generate_series] ( @p_start INT, @p_end INT) |
#!/bin/bash | |
server_list=$(gcloud compute instances list --format='get(networkInterfaces[0].networkIP)' --filter="status=running") | |
for server in ${server_list[@]}; do | |
echo "server: $server" | |
ssh $server 'sudo cat /var/spool/cron/* /etc/crontab' | |
echo "-----------" | |
done |
## include on your .zshrc (or similar) | |
#### tested on OSX | |
function findGitHistory() { | |
targetDir="${1}" | |
targetMonth="${2}" | |
targetYear="${3}" | |
targetUser=$(git config --get user.name) |
hidden text FILENAME | |
counter log_ftp_files_processed_count by username, remote_host, transfer_type, direction | |
counter log_ftp_files_deleted_count by username, remote_host, transfer_type | |
counter log_ftp_files_incomplete_transfers_count by username, remote_host, transfer_type | |
FILENAME = getfilename() | |
## example file | |
### Fri Jan 4 12:55:27 2019 1 1.2.3.4 224 /path/to/file.CSV b _ o r user_name ftp 0 * c |
package main | |
import ( | |
"fmt" | |
) | |
type contrato interface { | |
Insert() string | |
} |