php -S 0.0.0.0:8001 ./Serve.phpsudo python ./client.py| #!/bin/bash | |
| # ------------------------------------------------------------------------------------------------ | |
| # Creates a minimum operating system environment required for selected binaries to run | |
| # Usage: chroot-create.sh "/path/where/to/store/environment" list-of-binaries psql pg_restore | |
| # | |
| # After the environment is created just do as the regular user: fakechroot fakeroot chroot /path/where/to/store/environment /bin/sh | |
| # or directly: fakechroot fakeroot chroot /path/where/to/store/environment psql --help | |
| # ------------------------------------------------------------------------------------------------ |
| type ReadCloserWithCancellationWhenProcessFails struct { | |
| Parent io.ReadCloser | |
| Process *exec.Cmd | |
| Cancel func() | |
| } | |
| func (r ReadCloserWithCancellationWhenProcessFails) Read(p []byte) (n int, err error) { | |
| return r.Parent.Read(p) | |
| } |
| #!/bin/bash | |
| # Copyright 2020 RiotKit Tech Collective | |
| # ====================================== | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| #!/bin/bash | |
| # Copyright 2020 RiotKit Tech Collective | |
| # ====================================== | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at |
| #!/usr/bin/env python3 | |
| # Apache License 2.0 | |
| # | |
| # Read full license text at: http://www.apache.org/licenses/LICENSE-2.0 | |
| # Copyleft (c) 2020 RiotKit Tech Collective | |
| # | |
| # About RiotKit | |
| # | |
| # We are grassroot activists for social change, we respond to the needs of grassroot organizations, |
| #!/bin/bash | |
| # Copyright 2020 RiotKit Tech Collective | |
| # ====================================== | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at |
php -S 0.0.0.0:8001 ./Serve.phpsudo python ./client.py| #!/bin/bash | |
| # | |
| # Perform a test replication into the /tmp/wal-test directory | |
| # This command will tell you what is wrong with the replication | |
| # | |
| pg_receivewal -h 127.0.0.1 -p 5444 --user replication -D /tmp/wal-test/ |
| #!/bin/bash | |
| SUDO=${SUDO:-sudo} | |
| IMAGE=${IMAGE:-openjdk:8-jre-stretch} | |
| PARAMS="$@" | |
| if [[ ! ${PARAMS} ]]; then | |
| PARAMS="exit 1" | |
| fi |
| .SILENT: | |
| # Colors | |
| COLOR_RESET = \033[0m | |
| COLOR_INFO = \033[32m | |
| COLOR_COMMENT = \033[33m | |
| ## This help screen | |
| help: | |
| printf "${COLOR_COMMENT}Usage:${COLOR_RESET}\n" |