Skip to content

Instantly share code, notes, and snippets.

View xquery's full-sized avatar

James Fuller xquery

View GitHub Profile
root@6f6256a07c71:/src/curl/tests# ./runtests.pl -t106 358
********* System characteristics ********
* curl 7.70.0-DEV (x86_64-pc-linux-gnu)
* libcurl/7.70.0-DEV OpenSSL/1.1.1d c-ares/1.14.0 libssh2/1.8.0 nghttp2/1.41.0-DEV ngtcp2/0.1.90 nghttp3/0.1.90
* Features: alt-svc AsynchDNS Debug HTTP2 HTTP3 HTTPS-proxy IPv6 Largefile NTLM NTLM_WB SSL TLS-SRP TrackMemory UnixSockets
* Disabled:
* Host: 6f6256a07c71
* System: Linux 6f6256a07c71 4.19.76-linuxkit #1 SMP Thu Oct 17 19:31:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
* OS: linux
* Servers: SSL HTTP-IPv6 HTTP-unix FTP-IPv6
<testcase>
<info>
<keywords>
HTTP
HTTP GET
Alt-Svc
HTTP/2
</keywords>
</info>
@xquery
xquery / output
Created April 11, 2020 18:00
stripped down test
HTTP/1.1 400 Bad Request
Server: nghttpx
Content-Length: 129
Date: Sat, 11 Apr 2020 17:58:51 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
<!DOCTYPE html><html lang="en"><title>400 Bad Request</title><body><h1>400 Bad Request</h1><footer>nghttpx</footer></body></html>
@xquery
xquery / gist:2b3eada1c65fae6a625b1d6639a5b822
Created April 10, 2020 06:56
why do I get this output
<testcase>
<info>
<keywords>
HTTP
Alt-Svc
</keywords>
</info>
#
# Server-side
HTTP/1.1 400 Bad Request
Server: nghttpx
Content-Length: 129
Date: Thu, 09 Apr 2020 16:17:15 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
<!DOCTYPE html><html lang="en"><title>400 Bad Request</title><body><h1>400 Bad Request</h1><footer>nghttpx</footer></body></html>
<testcase>
<info>
<keywords>
HTTP
Alt-Svc
</keywords>
</info>
#
# Server-side
<testcase>
<info>
<keywords>
HTTP
Alt-Svc
</keywords>
</info>
#
# Server-side
<testcase>
<info>
<keywords>
HTTP
Alt-Svc
</keywords>
</info>
#
# Server-side
@xquery
xquery / gratuitous_solution_with_assert.py
Last active April 1, 2020 11:33
Sort a list of the strings "a", "bcd", "ef", and "ghij" in descending order of length.
"""
How do you sort a list of the strings "a", "bcd", "ef", and "ghij" in descending order of length?
(https://twitter.com/paulg/status/1244921240227282944)
"""
def sort_desc_by_string_length(data):
''' sorts an array by string length and return in descending order '''
# use python 'sorted' builtin to sort by string length and return in reverse order
# (https://docs.python.org/3.8/library/functions.html?highlight=sorted#sorted)
return sorted(data, key=len, reverse=True)
$ cat <<EOF | tee -a ~/.ssh/known_hosts
example.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvd4U77Q2yK0NjwBrAAVUeRTEvjH/2rnm1Mi3FgX5Y/g9/5h4wZ+FfqtdcSnbBnKN1uSnwqLS8kO3ti6MNf3/nhhXBO5XYBt1zpMggg2KAN63ThJNk62UK9QFjDdilJktOhSfMMhsZmTifX53Mpc44PdTLB53GTg57HD91E74e3UjWtjHnK1ZEjc4czVyfNdLRq9z6JoorSKqPPz9kiHiitwaKENY4kaLM4KN0CGK421G6G7uYDs3t1WyCe6DiiwJJ7r10WnE3KcSQOiow2CSVv7Mk2Ou5MiJHgASg3y+Hre6Y87OOJP0c9Lc300yMNt28hQptRyY9SD5FNsATUuMsw==
invalid-key.example.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvd4UERROR77Q2yK0NjwBrAAVUeRTEvjH/2rnm1Mi3FgX5Y/g9/5h4wZ+FfqtdcSnbBnKN1uSnwqLS8kO3ti6MNf3/nhhXBO5XYBt1zpMggg2KAN63ThJNk62UK9QFjDdilJktOhSfMMhsZmTifX53Mpc44PdTLB53GTg57HD91E74e3UjWtjHnK1ZEjc4czVyfNdLRq9z6JoorSKqPPz9kiHiitwaKENY4kaLM4KN0CGK421G6G7uYDs3t1WyCe6DiiwJJ7r10WnE3KcSQOiow2CSVv7Mk2Ou5MiJHgASg3y+Hre6Y87OOJP0c9Lc300yMNt28hQptRyY9SD5FNsATUuMsw==
empty-key.example.org
too-long.example.org 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678