I use a GPG key to sign my git commits.
An error like this one might be a sign of an expired GPG key.
error: gpg failed to sign the data fatal: failed to write commit object
Infrastructure-as-Code is a principal that drives modern DevOps practice. I discuss the current state of Terraform and provide some basic guidelines/principles regarding how to structure it's usage for your project.
When setting these options consider the following:
sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
# A tee for TCP, similar to `socal -v`. | |
# | |
# | server | |
# client ---| | |
# | stdout | |
import socket | |
from select import select | |
import sys | |
import logging |
import os | |
import fcntl | |
import contextlib | |
import time | |
@contextlib.contextmanager | |
def lockpidfile(filepath): | |
with os.fdopen( | |
os.open(filepath, os.O_RDWR | os.O_CREAT, mode=0o666), |
do $$ | |
DECLARE | |
ADV_LOCK BOOLEAN DEFAULT FALSE; | |
LOCK_ID INTEGER DEFAULT 50; | |
BEGIN | |
-- EARLY LOCK | |
-- LOCK_ID := 'tablename'::regclass::integer; | |
SELECT pg_try_advisory_lock(LOCK_ID) into ADV_LOCK; | |
RAISE NOTICE 'LOCK_ID: %', LOCK_ID; | |
IF ADV_LOCK THEN |
#!/usr/bin/env php | |
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
use Symfony\Component\Console\Application; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Finder\Finder; |
select | |
concat( | |
'create table ', | |
table_name, | |
'(', | |
string_agg( | |
concat( | |
column_name, | |
' ', | |
CASE when is_nullable = 'YES' THEN 'Nullable(' END, |
#!/usr/bin/env python | |
import parted | |
def add_partition(disk, free, align=None, length=None, fs_type=None, type=parted.PARTITION_NORMAL): | |
start = free.start | |
if length: | |
end = start + length - 1 | |
else: | |
end = free.end |
Edit /var/lib/postgres/data/postgresql.conf: | |
# change IP on subscriber | |
listen_addresses = '*' | |
wal_level = logical | |
shared_preload_libraries = 'pglogical' | |
max_worker_processes = 16 | |
max_wal_senders = 16 | |
max_replication_slots = 16 | |
track_commit_timestamp = on |