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
| #!/usr/bin/env bash | |
| # verify-claude.sh — Verify Claude Code is signed by Anthropic, then clear | |
| # the quarantine xattr that triggers Gatekeeper after each `brew upgrade`. | |
| # | |
| # macOS code signing pins identity via the Apple-issued Team ID, which is | |
| # bound to a Developer ID certificate. Bundle IDs are not authoritative — | |
| # anyone can claim `com.anthropic.claude-code`, but only Anthropic has | |
| # Team ID Q6L2SF6YDW. | |
| # | |
| # Steps: |
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
| #!/bin/bash | |
| set -euo pipefail | |
| target_branch=$1 | |
| current_branch=$(git rev-parse --abbrev-ref head) | |
| squash_branch=${current_branch}_work | |
| git checkout -B ${squash_branch} ${target_branch} | |
| git merge --squash ${current_branch} | |
| git commit -am "squashed" | |
| git checkout ${current_branch} | |
| git reset --hard ${squash_branch} |
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
| import java.util.function.Predicate; | |
| public class Refined<T> { | |
| private final T value; | |
| public Refined(Predicate<T> validator, T value) { | |
| if (!validator.test(value)) { | |
| throw new IllegalArgumentException("invalid value"); | |
| } |
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
| import java.nio.charset.StandardCharsets; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Map.Entry; | |
| import java.util.StringTokenizer; | |
| import java.util.TreeMap; |
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
| import java.nio.charset.StandardCharsets; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Map.Entry; | |
| import java.util.TreeMap; | |
| import java.util.concurrent.ArrayBlockingQueue; |