Skip to content

Instantly share code, notes, and snippets.

asdfasdfasdfasdf asd ps2goat

Block or report user

Report or block ps2goat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Get IAM token for AWS Kubernetes
# uses the aws iam authenticator to generate a token and store the result in a variable,
# then set the result's value into the clipboard for pasting.
# Replace the values in square brackets (including the brackets) with the correct values.
$x = aws-iam-authenticator token -i [your cluster name] -r [your assumed iam role name] | ConvertFrom-Json; Set-Clipboard -Value ($x.status.token)
@ps2goat
ps2goat / gist:bf06ff3592d6752e433292ec257a1fda
Last active Oct 11, 2018
PowerShell script to clean up docker images from a list of images. Use `docker image prune` for the built-in functionality.
View gist:bf06ff3592d6752e433292ec257a1fda
docker images | Select-String -Pattern ' (?<sha>\b[a-zA-Z0-9]{12})\b ' | foreach {docker rmi --force $_.Matches.Groups[1].Value}
You can’t perform that action at this time.