Skip to content

Instantly share code, notes, and snippets.

@pburkholder
pburkholder / tracing.py
Created March 19, 2024 22:44
011y python example
import os
from opentelemetry import (
trace
)
from opentelemetry.instrumentation.requests import RequestsInstrumentor
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
BatchSpanProcessor,
ConsoleSpanExporter,
@pburkholder
pburkholder / Note.md
Created March 14, 2017 12:11
Lean Agile Scrum Kanban

One of my colleagues at 18F asked in Slack:

I'm having a difficult time conceptualizing the difference between agile, lean, scrum, and kanban. Help! @channel

Leah Bannon jumped in with an excellent precis:

In short,

  • agile is a broad term that refers to the general ideas of individuals over interactions, working software over documentation, collaborating with customers, and changing/iterating. it’s more of a philosophy than a methodology.
  • lean, scrum, and kanban are methodologies that are guided by the philosophy of agile
  • lean is more designy and focuses on developing a hypothesis and then testing/researching to adjust or confirm it https://pages.18f.gov/lean-product-design/
event_name="ConsoleLogin"
aws cloudtrail lookup-events --lookup-attributes \
AttributeKey=EventName,AttributeValue=$event_name --query \
'Events[*].{Ev:CloudTrailEvent,User:Username}' |
jq '.[]| "Username: " + .User, " " + (.Ev| fromjson | "EventTime: " + .eventTime, "SourceIP: " + .sourceIPAddress) '
for event_name in AuthorizeSecurityGroupEgress AuthorizeSecurityGroupIngress CreatePolicy \
CreateSecurityGroup DeleteTrail ModifyVpcAttribute PutUserPolicy PutRolePolicy \
RevokeSecurityGroupEgress RevokeSecurityGroupIngress UpdateTrail; do
@pburkholder
pburkholder / teams.puml
Created February 11, 2021 20:47
Teams PlantUML
@startuml
(*) --> "Do you have an email address\nthrough the partner agency?"
if "" then
--> "Yes"
-->"Follow partner Teams"
-->"Do you have computer from agency?"
if "" then
--> "yes"
@pburkholder
pburkholder / rollback.md
Last active December 8, 2020 12:38
gitleaks version rollback
brew unlink gitleaks

Save the formula to local file, e.g.

wget https://raw.githubusercontent.com/Homebrew/homebrew-core/43a0bf66f703e40e26f429725c5ff500b6da4e12/Formula/gitleaks.rb

Then install from the local formula:

#!/bin/bash -euo pipefail
query='type+IN+audit.service_instance.create,audit.service_instance.delete'
total_pages=$(cf curl "/v2/events?results-per-page=100&q=${query}" | jq -c -r '.total_pages')
page=1
while [ $page -le $total_pages ]; do
cf curl "/v2/events?&results-per-page=100&page=${page}&q=${query}" |
jq -c -r '.resources[].entity | [ .timestamp, .actor_username, .type, .actee_name, .metadata.request.service_plan_guid ] | @csv '

Dear GSA,

The last few months have been a challenge. We’ve experienced a global pandemic that pushed us out of our offices, out of our community gathering places, and kept us in our homes. What was unthinkable a short time ago has become the norm. We are wearing face coverings, keeping our distance from family, friends, and passers-by alike, and monitoring our temperature to ensure we stay healthy. What we’ve done to protect ourselves, our loved ones, and our communities has not been easy.

After sixteen town halls, I know that each of us have found this time challenging, albeit in different ways. Now, like you, I’m struggling as a result of the tragic death of George Floyd and the aftermath. I know it is important to speak about this, but I’ve been worried that I wouldn’t be able to find the right words to express what is in my heart right now. This morning, I saw a statement from U.S. Treasury Secretary Steve Mnuchin that gave a voice to what I’ve been struggling to say.

Secretary Mnuchin said, “[f]ollo

@pburkholder
pburkholder / demo.sh
Last active May 29, 2020 12:57
gitleak whitelist commit bug demo
#!/bin/sh
REPO_PATH=$(mktemp -d "/tmp/gittest.XXXXXX")
echo ====== using REPO_PATH $REPO_PATH =====
pushd $REPO_PATH
git init .
git config --local hooks.gitleaks false; # Needed for my local test
echo "SECRET" > README
git add README
@pburkholder
pburkholder / SSL_Cipher_Test.md
Last active April 16, 2020 01:31 — forked from warmfusion/SSL_Cipher_Test.md
Uses OpenSSL to test which SSL ciphers are supported on a given backend
Obtaining cipher list from OpenSSL 0.9.8zg 14 July 2015.
Testing ADH-SEED-SHA                   NO (sslv3 alert handshake failure)
Testing DHE-RSA-SEED-SHA               NO (sslv3 alert handshake failure)
Testing DHE-DSS-SEED-SHA               NO (sslv3 alert handshake failure)
Testing SEED-SHA                       NO (sslv3 alert handshake failure)
Testing ADH-AES256-SHA                 NO (sslv3 alert handshake failure)
Testing DHE-RSA-AES256-SHA             YES
Testing DHE-DSS-AES256-SHA             NO (sslv3 alert handshake failure)
Testing AES256-SHA                     NO (sslv3 alert handshake failure)
@pburkholder
pburkholder / intermediate.sh
Created August 4, 2016 14:21
Run my CA with intermediate certs in a hurry:
#!/bin/bash -e
# https://jamielinux.com/docs/openssl-certificate-authority/index.html
target=qdev.govready.com
mkdir -p private certs newcerts
function root() {
echo generate root key