Skip to content

Instantly share code, notes, and snippets.

Avatar
🐌

David Rio Deiros drio

🐌
View GitHub Profile
@drio
drio / README.md
Last active Jul 28, 2022
go-builds-in-github-actions
View README.md

Go builds in github actions

  1. Create the .github/workflows/release_build.yml. Pay attention to line 30, you may want to adjust that for your project.
  2. In the github UI, add a new token in Settings > Developer Settings > Personal access tokens. Save the token.
  3. In your project settings, under Secrets > Actions add a secret name with the value of the token that you just created.
  4. Use a script
@drio
drio / .gitignore
Last active Jul 28, 2022
ssl_tls_concepts
View .gitignore
*.cert
*.crt
*.key
@drio
drio / README.md
Last active Jul 25, 2022
router_os_mikrotik
View README.md
@drio
drio / index.txt
Created Jul 20, 2022
gist name here
View index.txt
Start here.
@drio
drio / how_to_gist_from_cli.md
Last active Jul 20, 2022
how to gist from cli
View how_to_gist_from_cli.md

How to gist from the cli

To create a new gist from cli:

$ gh gist create hello.md -d "hello world" -p -w

Then you can list your gist:

View PromQL-notes.md

Ch13 - Intro to PromQL

Aggregating gauges

We have a gauge metric called: node_filesystem_size_bytes

node_filesystem_free_bytes{device="/dev/sda1",fstype="vfat",
        instance="localhost:9100",job="node",mountpoint="/boot/efi"} 70300672
    node_filesystem_free_bytes{device="/dev/sda5",fstype="ext4",
View drio-metadata.xml
<?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"/>
View metadata.staging.xml
<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
View saml-flow-samltestid.txt
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"