TL;DR
Install Postgres 11, and then:
sudo pg_dropcluster 11 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
package main | |
import ( | |
"context" | |
"log" | |
"strings" | |
"time" | |
"github.com/aws/aws-sdk-go-v2/aws" | |
"github.com/aws/aws-sdk-go-v2/config" |
defmodule Hungarian do | |
@moduledoc """ | |
Written by Adam Kirk – Jan 18, 2020 | |
Most helpful resources used: | |
https://www.youtube.com/watch?v=dQDZNHwuuOY | |
https://www.youtube.com/watch?v=cQ5MsiGaDY8 | |
https://www.geeksforgeeks.org/hungarian-algorithm-assignment-problem-set-1-introduction/ |
TL;DR
Install Postgres 11, and then:
sudo pg_dropcluster 11 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
How to get an estimate of the impact of writing Postgres logs with log_min_duration_statement = 0
:
Do select pg_stat_statements_reset();
and wait N seconds (where N >> 60 – say 1-24 hours, covering typical busy hours). Remember when it was, and write down somewhere – this timestamp will be needed!
Check if select count(*) from pg_stat_statements
is lower than pg_stat_statements.max
. If it's equal to it, then raise pg_stat_statements.max
and restart with the step 1.
Get the estimate:
\set TS_PGSS_RESET 'XXXX-XX-XX XX:XX:XX';
FROM nginx:alpine AS builder | |
# nginx:alpine contains NGINX_VERSION environment variable, like so: | |
# ENV NGINX_VERSION 1.15.0 | |
# Our NCHAN version | |
ENV NCHAN_VERSION 1.1.15 | |
# Download sources | |
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \ |
pg_dump is a nifty utility designed to output a series of SQL statements that describes the schema and data of your database. You can control what goes into your backup by using additional flags.
Backup: pg_dump -h localhost -p 5432 -U postgres -d mydb > backup.sql
Restore: psql -h localhost -p 5432 -U postgres -d mydb < backup.sql
-h is for host.
-p is for port.
-U is for username.
-d is for database.
# ---------------------------------- | |
# Colors | |
# ---------------------------------- | |
NOCOLOR='\033[0m' | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
ORANGE='\033[0;33m' | |
BLUE='\033[0;34m' | |
PURPLE='\033[0;35m' | |
CYAN='\033[0;36m' |
I've frequently been bit by failures restarting my vpn on my Mac. The connection may appear to start up in Shimo (the menu icon will change) but it looks like vpnc can't connect.
Looking at the log, we see the connection gets stuck
ERROR: can't send packet: Can't assign requested address
This has plagued me for a while, and my only fix has been to restart the machine. I hate restarting my machine. So I finally made time to dig in and find a better solution
This list is based on aliases_spec.rb.
You can see also Module: RSpec::Matchers API.
matcher | aliased to | description |
---|---|---|
a_truthy_value | be_truthy | a truthy value |
a_falsey_value | be_falsey | a falsey value |
be_falsy | be_falsey | be falsy |
a_falsy_value | be_falsey | a falsy value |