To create a new gist from cli:
$ gh gist create hello.md -d "hello world" -p -w
Then you can list your gist:
<?xml version="1.0"?> | |
<md:EntityDescriptor entityID="urn:amazon:cognito:sp:us-east-1_HChS0Nmga"> | |
<md:SPSSODescriptor AuthnRequestsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"> | |
<md:NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</md:NameIDFormat> | |
<md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://tufts-shib-staging.auth.us-east-1.amazoncognito.com/saml2/idpresponse" index="1"/> | |
<md:AttributeConsumingService index="1"> | |
<md:ServiceName xml:lang="en">Cognito Test Shib</md:ServiceName> | |
<md:RequestedAttribute FriendlyName="givenName" Name="urn:oid:2.5.4.42"/> | |
<md:RequestedAttribute FriendlyName="sn" Name="urn:oid:2.5.4.4"/> | |
<md:RequestedAttribute FriendlyName="mail" Name="urn:oid:0.9.2342.19200300.100.1.3"/> |
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" validUntil="2022-03-31T17:10:39.744Z" entityID="https://staging.drtufts.net/saml/metadata"> | |
<SPSSODescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" validUntil="2022-03-31T17:10:39.743793359Z" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol" AuthnRequestsSigned="false" WantAssertionsSigned="true"> | |
<KeyDescriptor use="encryption"> | |
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> | |
<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#"> | |
<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#">MIICqjCCAZICCQC6eUzsDXLswzANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAwuZXhhbXBsZS5jb20wHhcNMjIwMzA5MjEwMzA4WhcNMjMwMzA5MjEwMzA4WjAXMRUwEwYDVQQDDAwuZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCxSkMqXJKLrCp5Ywugxw2/oUcyGkqFNQqOn7Uf/TTCGYZMKjCnd88dXbPpMMDH8O17TJxS4pygCzXSUXZyWicDrnwOmteNvfYJGehFCbzL1fit7PmAbpdra6Q/baCfQm+R6Jpm9CVyIm6WkKeXUcYymb4RyCSIqHZ1vP0oUmQUL47bdBuoDxt/YULH6SQjxzgI4wEAETgM1c6oKFmZu5 |
2022-03-17 11:16:27,681 - DEBUG [PROTOCOL_MESSAGE:?] - | |
<?xml version="1.0" encoding="UTF-8"?> | |
<samlp:LogoutRequest | |
Destination="https://samltest.id/idp/profile/SAML2/Redirect/SLO" | |
ID="id-b92224d213b3905baf9a184d92170c5d9f98ec56" | |
IssueInstant="2022-03-17T11:16:27.575Z" Version="2.0" | |
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"> | |
<saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">https://staging.drtufts.net/saml/metadata</saml:Issuer> | |
<saml:NameID | |
Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" |
// vim: set foldmethod=indent foldlevel=1 et: | |
package main | |
import ( | |
"context" | |
"crypto/rsa" | |
"crypto/tls" | |
"crypto/x509" | |
"flag" | |
"fmt" |
Nine years ago I was doing a lot of bioinformatics work. I was also writing golang code to learn the language and see if I could use it for my daily programming tasks.
At the same time I came across a set of benchmarks that tested how fast different programming languages could read fastq files. The winner was a heavily optimized c program.
Naturally, I decided to write an implementation in golang. My first attempt did not do better than the c version (didn't do that bad either -- same order of magnitude if I remember correctly). But with the help of the golang community I ended up writing a version that was faster than the c implementation.
Fast forward 9 years. I came across this article that discusses how the different versions of golang have been cons
from confluent_kafka import Producer | |
class SimpleProducer: | |
def __init__(self, brokers: str): | |
config = {'bootstrap.servers': brokers, 'queue.buffering.max.ms': 1, | |
'message.send.max.retries': 5, 'retry.backoff.ms': 200, | |
'message.max.bytes': 104857600, | |
'default.topic.config': {'request.required.acks': 'all'}} |
from confluent_kafka import Consumer, KafkaError, OFFSET_BEGINNING | |
class SimpleConsumer: | |
def __init__(self, brokers: str, topic: str, consumer_group: str): | |
self.topic = topic | |
self.config = { | |
'bootstrap.servers': brokers, | |
'group.id': consumer_group, |
#!./.venv/bin/python3 | |
from confluent_kafka import Consumer, KafkaException | |
import sys | |
import getopt | |
import json | |
import logging | |
from pprint import pformat | |
config = { |