Skip to content

Instantly share code, notes, and snippets.

View reschke's full-sized avatar

Julian Reschke reschke

View GitHub Profile
@reschke
reschke / sctypes.txt
Created February 19, 2021 16:38
use of sourcecode types in AUTH48 RFC XML
8650: yangtree (at line 540)
8650: yang (at line 552)
8650: json (at line 1324)
8650: json (at line 1345)
8650: json (at line 1362)
8652: yangtree (at line 329)
8652: yangtree (at line 393)
8652: yangtree (at line 532)
8652: yangtree (at line 642)
8652: yang (at line 681)
<?xml version="1.0" encoding="UTF-8"?>
<?rfc comments="yes"?>
<?rfc toc="yes"?>
<rfc docName="draft-reschke-xref-tests"
submissionType="independent"
category="info"
ipr="trust200902"
version="3">
<front>
<title>Tests for &lt;xref&gt; Element</title>
@reschke
reschke / words-with-s-in-para.txt
Created April 24, 2020 09:17
words containing "(s)" extracted from rfc8???.xml
1 (s)he
1 (TB)struct(s)
1 account(s)
2 action(s)
1 advertisement(s)
1 advisor(s)
2 agreement(s)
8 algorithm(s)
4 anchor(s)
1 answer(s)
@reschke
reschke / gist:e1750b3a224528bf0eab1e4526efea84
Created April 21, 2020 18:15
xml2rfc boilerplate test
<rfc version="3" number="123" docName="draft-test-00" submissionType="IETF" category="bcp" seriesNo="123" ipr="trust200902">
<front>
<title>Tests around boilerplate and seriesInfo</title>
<seriesInfo name="RFC" value="123"/>
<seriesInfo name="BCP" value="456"/>
<author fullname="A. Nonymous"/>
</front>
<middle>
<section>
<name>Test Section</name>
[INFO] <<< maven-javadoc-plugin:3.1.0:javadoc (default-cli) < generate-sources @ oak-commons <<<
[INFO]
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=54200, ConflictMarker.markTime=22700, ConflictMarker.nodeCount=17, ConflictIdSorter.graphTime=8800, ConflictIdSorter.topsortTime=12300, ConflictIdSorter.conflictIdCount=14, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=213000, ConflictResolver.conflictItemCount=16, DefaultDependencyCollector.collectTime=646000, DefaultDependencyCollector.transformTime=333300}
[DEBUG] org.apache.jackrabbit:oak-commons:bundle:1.14-SNAPSHOT
[DEBUG] org.osgi:org.osgi.annotation:jar:6.0.0:provided
[DEBUG] org.slf4j:slf4j-api:jar:1.7.26:compile
[DEBUG] org.jetbrains:annotations:jar:17.0.0:provided
[DEBUG] com.google.guava:guava:jar:15.0:compile
[DEBUG] commons-io:commons-io:jar:2.6:compile
[DEBUG] org.apache.jackrabbit:jackrabbit-jcr-commons:jar:2.18.1:compile
4842: would have caption: true (anchor=VTsizes, title=VT Super-Frame Payload Sizes, suppress-title=false)
4842: would have caption: true (anchor=NPInterpert, title=Interpretation of N and P Bits, suppress-title=false)
4842: would have caption: true (anchor=CEPBitRate, title=CEP/TDM Bit Rates, suppress-title=false)
4842: would have caption: true (anchor=SONETLineRate, title=Standard SONET Line Rates, suppress-title=false)
4842: would have caption: true (anchor=SONETPayloadSize, title=Payload Size and Rate, suppress-title=false)
4876: would have caption: false (anchor=, title=, suppress-title=false)
4895: would have caption: true (anchor=parametertable, title=, suppress-title=false)
4895: would have caption: true (anchor=Digesttable, title=, suppress-title=false)
4895: would have caption: true (anchor=causetable, title=, suppress-title=false)
4895: would have caption: true (anchor=chunktable, title=, suppress-title=false)
if (be.isRepeatable()) {
try {
System.out.println();
System.out.println(be.getContentType());
if (null != be.getContentEncoding()) {
System.out.println(be.getContentEncoding());
}
System.out.println("Content-Length: " + be.getContentLength());
try (InputStream is = be.getContent()) {
int pos = 0;
@reschke
reschke / gist:46659c912b426dffeac41d9a21421c95
Last active February 19, 2017 18:10
aes128cgm content coding test
import java.io.ByteArrayOutputStream;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.Base64;
import javax.crypto.Cipher;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
import javax.crypto.spec.GCMParameterSpec;
@reschke
reschke / gist:226be61331653164b80a
Last active February 2, 2016 14:35
pgdjbc BatchUpdateException test
import java.sql.BatchUpdateException;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Arrays;
@reschke
reschke / 535.diff
Created July 2, 2014 13:41
proposed patch for HTTP2 issue 535
diff --git a/draft-ietf-httpbis-http2.xml b/draft-ietf-httpbis-http2.xml
index 613d763..3de7ff9 100755
--- a/draft-ietf-httpbis-http2.xml
+++ b/draft-ietf-httpbis-http2.xml
@@ -2676,6 +2676,13 @@ HTTP2-Settings = token68
An HTTP message (request or response) consists of:
<list style="numbers">
<t>
+ zero or more <x:ref>HEADERS</x:ref> frames (followed by zero or
+ more <x:ref>CONTINUATION</x:ref> frames) containing the message