Skip to content

Instantly share code, notes, and snippets.

View danvas's full-sized avatar

Daniel Vasquez danvas

View GitHub Profile
// Statistics refresher: The R-squared formula
// Time complexity: O(3n)
package main
import "fmt"
type Point struct {
x, y float64
}
@danvas
danvas / README.md
Last active November 28, 2023 20:20
Authorization code flow with PKCE
@danvas
danvas / README.md
Last active November 28, 2023 20:22
Signing AWS API requests

Signing AWS API requests

Implentation of calculating a signature for signing AWS API requests. Specifically, this script invalidates all files (/*) in a Cloudfront distribution via a signed API request.

To run it, edit the .sh file by settting AWS_ACCESS_KEY, AWS_SECRET_KEY, and DISTRIBUTION_ID with your values, and source the file in a shell:

source signedAWSRequest.sh