// Script to scrape the EKS Kubernetes versions from the AWS documentation
// and produce a JSON file that Renovate can parse.
// Usage: node eks-k8s-version-scraper.js > eks-k8s-versions.json
const axios = require('axios');
const cheerio = require('cheerio');
const fs = require('fs');
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Helper module for parsing front matter from a markdown file and returning | |
# the front matter content as a map. | |
# | |
# Usage: | |
# module "frontmatter" { | |
# source = "./path/to/modules/frontmatter" | |
# content = file("path/to/markdown/file.md") | |
# } | |
# | |
# output "title_from_front_matter" { |
-
Install asciinema.
Homebrew:
brew install asciinema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Demonstrate checking if two JSON strings match. | |
// Formatted JSON can be compared with minified JSON and will match as long as | |
// the keys and values are the same. | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"reflect" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/sha512" | |
"fmt" | |
) | |
// shaSum returns a SHA512 checksum of a string. | |
func shaSum(s string) string { | |
sha_512 := sha512.New() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------------ | |
# == CloudFront Cache Invalidation | |
# ------------------------------------------------------------------------------ | |
.cf_invalidate: | |
image: | |
name: amazon/aws-cli:latest | |
entrypoint: [""] | |
stage: CloudFront | |
when: manual | |
tags: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLOUDFRONT_HOST=foo.gov | |
# Get the CloudFront distribution ID based on the host name (CLOUDFRONT_HOST) | |
cfid=$(aws cloudfront list-distributions --query "DistributionList.Items[].{id: Id,cf_domain: DomainName, aliases: Aliases.Items[0]}[?contains(aliases, '${CLOUDFRONT_HOST}')] | [0].id" --output text) | |
# Invalidate the cache | |
aws cloudfront create-invalidation --distribution-id "$cfid" --paths "/one/* /two/*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQINBGIuF3wBEAC4AHffV5BtU7eSXJU2EJHuOcPrk1S80lsr4iM4OXZN2PEBbilP | |
ArBU7HsC8VVk6bIvhFyY/FsRPTGQglwJZGquCh5k+ReGhzY9q81gQL2F9b2hO0hO | |
A8M7eKKu5QuUdIKZeXZ01Pgxj6H3hc1jKOqmCGveoadrXMgp66HiGc6QqPlgjI8P | |
/E6l/prxgRz2/Io7kntnoECIyw3hdOB51bk7JXLL5mrUZyPgOqBTVqhw6X3rh8MG | |
bYa5vhrzbGWsTSOiBIiRclJwD40udQw0HSM6IeDMGBgPmI0bzTP1ee/eDNcMT7v1 | |
esHGGci+RQKBSMiRy8aREhsLNe6WRaw9ubWQJSzL6HkEpCLPWZBfvFHuAnlFPZ43 | |
4wZEvyltbHjkZ2MGTo+4Gz06PQotj552sGB5a5SwKBd97wgA7lV/9yO7VoTsAPUx | |
KOKNIjox2KZ218ogtXKpLr3riALEAVmnlw4PbajTe6dR7fqL1TGWAjB3ZgHMCLUG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rule "Parse AWS CloudFront Raw Logs" | |
when | |
regex("^(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)", to_string($message.message)).matches == true | |
then | |
let m = regex("^(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)", to_string($message.message)); | |
let t = parse_unix_milliseconds(to_long(replace(to_string(m["0"]), "." |
I hereby claim:
- I am joshbeard on github.
- I am joshbeard (https://keybase.io/joshbeard) on keybase.
- I have a public key whose fingerprint is 19CB 9097 DF60 B2E5 DCB8 2475 E0E2 33C7 D4A3 A42D
To claim this, I am signing this object:
NewerOlder