Say, that database "foo" is now owned by "user1"
Alter owner:
\c postgres
ALTER DATABASE "foo" OWNER TO "user2"
Reassign ownership (see also https://stackoverflow.com/a/13535184/1943126):
Say, that database "foo" is now owned by "user1"
Alter owner:
\c postgres
ALTER DATABASE "foo" OWNER TO "user2"
Reassign ownership (see also https://stackoverflow.com/a/13535184/1943126):
| #!/bin/bash | |
| set -u -e | |
| # On systems with `systemd-resolved.service`, this script can be used as an "up" hook in client ovpn file. | |
| # For example: | |
| # ... | |
| # script-security 2 | |
| # up /etc/openvpn/add-routing-domain.bash | |
| # ... |
Download k3s binary on all machines at /usr/local/bin (see instructions at https://k3s.io/)
Prepare env file for the service unit (/etc/default/k3s). For example:
INTERNAL_IP=10.0.5.19
| import java.time.Duration; | |
| import java.util.concurrent.Callable; | |
| import java.util.concurrent.DelayQueue; | |
| import java.util.concurrent.Delayed; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Executors; | |
| import java.util.concurrent.TimeUnit; | |
| public class DelayQueueExample | |
| { |
See also: https://unix.stackexchange.com/questions/233327/is-it-possible-to-clone-only-part-of-a-git-project
Clone with a specific history depth (--depth) and start at the root of the repository (--sparse).
You can also filter-out BLOB files. For example:
git clone --sparse --depth 1 --filter blob:none --branch master https://github.com/NowhereLand/helloworld
Change directory into the newly-cloned repository and enable sparse-checkout mechanism (to fetch parts of the subtree in steps of increasing depth)
See also: https://flywaydb.org/documentation/configuration/configfile
Prepare basic Flyway configuration (no sensitive data inside), say at config/flyway.conf:
# vim: set syntax=jproperties:
# See https://flywaydb.org/documentation/configuration/configfile
flyway.schemas = foo
flyway.defaultSchema = foo| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| const int MAX_LINE_SIZE = 10; | |
| int main(int argc, char **argv){ | |
| char line[MAX_LINE_SIZE + 2]; |
| import java.util.Objects; | |
| /** | |
| * Mimic escaping logic from Python {@code escapism} package. | |
| */ | |
| public class Escapism | |
| { | |
| public static final String SAFE_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789"; | |
| public static final char ESCAPE_CHAR = '-'; |
| #ifndef _WEIGHTED_GRAPH_HPP | |
| #define _WEIGHTED_GRAPH_HPP 1 | |
| #include <iostream> | |
| #include <limits> | |
| #include <vector> | |
| #include <set> | |
| #include <unordered_set> | |
| #include <queue> | |
| #include <stdexcept> |