Skip to content

Instantly share code, notes, and snippets.

View coltnz's full-sized avatar

Colin Taylor coltnz

View GitHub Profile
@mprokopov
mprokopov / docker-credentials-1password-helper.clj
Created October 16, 2022 18:20
Docker helper to provision AWS token from AWS credentials stored in 1Password Connect.
#!/usr/bin/env bb
;; 0. run using 1Password CLI "op inject -i docker-credentials-1password -o docker-credentials-1password" to replace
;; reference to op://Personal/1P token/credential with real 1Password Connect token.
;; http://onepasswordconnect.local/v1/vaults/vault_uuid/items/item_uuid should point to your 1Password Connect, vault and item with AWS credentials.
;; 1. save to /usr/local/bin/docker-credentials-1password;
;; 2. install babashka from http://babashka.org
;; 3. create /etc/docker/config.json
;; { "credsStore": "1password" }
;; 4. install docker-credentials-ecr-login from https://github.com/awslabs/amazon-ecr-credential-helper
;; 5. docker pull xxxxxxxxxxxxx.dkr.ecr.eu-central-1.amazonaws.com/my-great-repo should just work now!

Zoom Code Review

===============

Why Code Review?

The most effective way to get bugs out of code is code review. More than running the code, more than unit tests, having someone else review an author's code is the best technique known to eliminate bugs (Fagan 1975 and Cohen 2006).

@talios
talios / gist:2893027
Created June 8, 2012 02:07
Javac Compiler Bug...
Potential bug in JavaC. Surely the line should be:
annotationProcessingOccurred = c.annotationProcessingOccurred == true;
and do a comparison instead of multi-assignment ( and only assign it if annotationProcessingOccurred is current false, as I don't think we want to reassign a true setting to false here).
Open JDK 6:
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/com/sun/tools/javac/main/JavaCompiler.java#JavaCompiler