Skip to content

Instantly share code, notes, and snippets.

View nssfiles.tgz.shar
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.15.2).
# To extract the files from this archive, save it to some FILE, remove
# everything before the '#!/bin/sh' line above, then type 'sh FILE'.
#
lock_dir=_sh2220211
# Made on 2020-08-02 12:00 EDT by <andrew@emma>.
# Source directory was '/mnt/epgl/npgl/pg_head'.
#
# Existing files will *not* be overwritten, unless '-c' is specified.
@adunstan
adunstan / gist:bd50b322e3507bc377134eb6ee1a6974
Last active May 8, 2020
gitlab get list of repos via API
View gist:bd50b322e3507bc377134eb6ee1a6974
curl --header "Authorization: Bearer <your_access_token>" https://gitlab.example.com/api/v4/projects |
jq -c -r '.[]|[.http_url_to_repo, .visibility]'
# works with private token or OAuth token
@adunstan
adunstan / gist:6fd1c167e772276701e19457d235ddf5
Last active May 8, 2020
get a list of repos for an org and the private flag via github API
View gist:6fd1c167e772276701e19457d235ddf5
curl -H "Authorization: token $token" -s "https://api.github.com/orgs/$orgname/repos?per_page=100&page=$pagenum" | \
jq -c -r '.[]|[.html_url, .private]'
View fix_validate_regression.patch
diff --git a/src/bin/pg_validatebackup/t/003_corruption.pl b/src/bin/pg_validatebackup/t/003_corruption.pl
index 7a09d02e6c..fe717dfc73 100644
--- a/src/bin/pg_validatebackup/t/003_corruption.pl
+++ b/src/bin/pg_validatebackup/t/003_corruption.pl
@@ -16,6 +16,8 @@ $master->start;
# Include a user-defined tablespace in the hopes of detecting problems in that
# area.
my $source_ts_path = TestLib::perl2host(TestLib::tempdir_short());
+my $source_ts_prefix = $source_ts_path;
+$source_ts_prefix =~ s!([^A-Z]:/[^/]*)/.*!$1!;
@adunstan
adunstan / chocolatey.log
Created Dec 16, 2019
win-flex-bison install log
View chocolatey.log
2019-12-16 02:37:36,092 4564 [DEBUG] - XmlConfiguration is now operational
2019-12-16 02:37:36,170 4564 [INFO ] - ============================================================
2019-12-16 02:37:36,232 4564 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\config".
2019-12-16 02:37:36,451 4564 [DEBUG] - Attempting to create directory "C:\Users\Administrator\AppData\Local\Temp\chocolatey".
2019-12-16 02:37:36,529 4564 [DEBUG] - Attempting to replace "C:\ProgramData\chocolatey\config\chocolatey.config"
with "C:\ProgramData\chocolatey\config\chocolatey.config.4564.update".
Backup placed at "C:\ProgramData\chocolatey\config\chocolatey.config.backup".
2019-12-16 02:37:36,529 4564 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\config\chocolatey.config.4564.update"
to "C:\ProgramData\chocolatey\config\chocolatey.config".
2019-12-16 02:37:36,545 4564 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\config\chocolatey.config.4564.update".
@adunstan
adunstan / libpq-fix-nossl-builds.patch
Created Dec 1, 2019
libpq-fix-nossl-builds.patch
View libpq-fix-nossl-builds.patch
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index e55b375c51..994605d0be 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -432,6 +432,24 @@ PQsslAttributeNames(PGconn *conn)
return result;
}
+
+PQsslKeyPassHook_type
View testlib-close-stdin.patch
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index 905d0d178f..df39671700 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -87,6 +87,8 @@ our @EXPORT = qw(
our ($windows_os, $tmp_check, $log_path, $test_logfile);
+my @no_stdin;
+
View ssl-passphrase-callback-2.patch
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index 629919cc6e..bf4493c94a 100644
--- a/src/backend/libpq/be-secure-openssl.c
+++ b/src/backend/libpq/be-secure-openssl.c
@@ -45,6 +45,9 @@
#include "utils/memutils.h"
+ssl_passphrase_func_cb ssl_passphrase_function = NULL;
+bool ssl_passphrase_function_supports_reload = false;
View gist:bc906855f73c4aa60c5bfa48622332c4
0 [main] pg_regress (32588) child_copy: cygheap read copy failed, 0x180317408..0x18032A988, done 0, windows pid 32588, Win32 error 6
1703 [main] pg_regress (32588) C:\tools\msys64\home\Administrator\bf\root\HEAD\pgsql.build\src\test\regress\pg_regress.exe: *** fatal error - ccalloc would have returned NULL
View scrub_strings.pl
perl -p -e "local \$/ = undef; my \$log = <>; \$log =~ s/('|\\\$[a-zA-Z0-9_]*\\\$)(.*)\$1/\$1 . (q[X] x length(\$2)) . \$1/gme; print \$log;" /tmp/logsamp
You can’t perform that action at this time.