Skip to content

Instantly share code, notes, and snippets.

View trobert2's full-sized avatar

Robert Tingirică trobert2

View GitHub Profile
@trobert2
trobert2 / get-thumbprint.sh
Created November 16, 2022 09:15
Get ssl thumbprint of any domain
#!/bin/bash
HOST=$(curl https://$1/.well-known/openid-configuration \
| jq -r '.jwks_uri | split("/")[2]')
echo | openssl s_client -servername $HOST -showcerts -connect $HOST:443 2> /dev/null \
| sed -n -e '/BEGIN/h' -e '/BEGIN/,/END/H' -e '$x' -e '$p' | tail +2 \
| openssl x509 -fingerprint -noout \
| sed -e "s/.*=//" -e "s/://g" \
| tr "ABCDEF" "abcdef"
@trobert2
trobert2 / getparamfromregion.ts
Last active September 16, 2022 07:33
Gist to get a parameter value version from a different region
const sdkCall: AwsSdkCall = {
service: 'SSM',
action: 'getParameter',
parameters: {
Name: '/app/lambda-handler-version-arn'
},
region: 'us-east-1',
physicalResourceId: PhysicalResourceId.of(Date.now().toString())
}
pipeline {
agent {
label "pod-label"
}
stages {
stage("Build") {
steps {
script {
browser = webdriver.Firefox()
browser.get(idpentryurl)
username = browser.find_element_by_id("userNameInput")
password = browser.find_element_by_id("passwordInput")
username.send_keys("robert@someplace.com")
password.send_keys("change me")
browser.find_element_by_id("submitButton").click()
browser.find_element_by_id("continueButton").click()
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: todo.proto
package todo
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
[2016-06-01 09:43:28 - DEBUG2] Reading configuration from "/etc/puppetlabs/r10k/r10k.yaml"
[2016-06-01 09:43:28 - DEBUG1] Testing to see if feature pe_license is available.
[2016-06-01 09:43:28 - DEBUG2] Attempting to load library 'pe_license' for feature pe_license
[2016-06-01 09:43:28 - DEBUG2] Error while loading library pe_license for feature pe_license: cannot load such file -- pe_license
[2016-06-01 09:43:28 - DEBUG1] Feature pe_license is not available.
[2016-06-01 09:43:28 - DEBUG2] pe_license feature is not available, PE only Puppet modules will not be downloadable.
[2016-06-01 09:43:28 - DEBUG1] Testing to see if feature shellgit is available.
[2016-06-01 09:43:28 - DEBUG2] Evaluating proc #<Proc:0x00000002bed690@/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/r10k-2.3.0/lib/r10k/features.rb:16> to test for feature shellgit
[2016-06-01 09:43:28 - DEBUG2] Proc #<Proc:0x00000002bed690@/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/r10k-2.3.0/lib/r10k/features.rb:16> for feature shellgit returned "/us