Skip to content

Instantly share code, notes, and snippets.

@jhirshman
jhirshman / render_numeric_unit.yaml
Last active October 13, 2025 11:08
Render Numeric Unit
AllowedUnitConversionNone:
type: Object
properties:
type:
type: Literal<none>
AllowedUnitConversionCompatible:
type: Object
properties:
type:
<?xml version="1.0" encoding="UTF-8"?><md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://accounts.google.com/o/saml2?idpid=C03rkjkfj" validUntil="2027-09-26T16:07:41.000Z">
<md:IDPSSODescriptor WantAuthnRequestsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<md:KeyDescriptor use="signing">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>MIIDdDCCAlygAwIBAgIGAYN/tD0jMA0GCSqGSIb3DQEBCwUAMHsxFDASBgNVBAoTC0dvb2dsZSBJ
bmMuMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MQ8wDQYDVQQDEwZHb29nbGUxGDAWBgNVBAsTD0dv
b2dsZSBGb3IgV29yazELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEwHhcNMjIwOTI3
MTYwNzQxWhcNMjcwOTI2MTYwNzQxWjB7MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEWMBQGA1UEBxMN
TW91bnRhaW4gVmlldzEPMA0GA1UEAxMGR29vZ2xlMRgwFgYDVQQLEw9Hb29nbGUgRm9yIFdvcmsx
//returns 1 if x is min; 0 if y is min; -1 if z is min
int min3(int x, int y, int z)
{
if (x < y) {
if (z < x) {
return -1; //z < x < y
}
else {
return 1; //x < z,y
}