Skip to content

Instantly share code, notes, and snippets.

View rodrigodealer's full-sized avatar

Rodrigo Oliveira rodrigodealer

View GitHub Profile
@pkirkovsky
pkirkovsky / yubikey-reset.sh
Last active February 28, 2025 10:02
Utility for resetting a Yubikey to factory defaults using gpg-connect-agent. This will wipe out any stored keys and reset PINs to default values.
# Adapted from https://developers.yubico.com/ykneo-openpgp/ResetApplet.html
gpg-connect-agent <<EOF
/hex
scd serialno
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
@mmiranda
mmiranda / ecr-policy.tf
Created June 17, 2022 08:57
ECR Access from differents organizations
// Grant Read Only access to all account inside AWS organization
data "aws_iam_policy_document" "ecr_organization_readonly_access" {
statement {
sid = "ReadonlyAccess"
effect = "Allow"
principals {
type = "*"
identifiers = ["*"]
}