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
| """ | |
| Sentry's built-in scrubber only masks keys it already knows about. Custom | |
| fields, exception messages, and POST body data regularly leak emails, tokens, | |
| and other PII. This hook scrubs at the event level before anything leaves | |
| the process. | |
| Register with: | |
| sentry_sdk.init(before_send=before_send, before_breadcrumb=before_breadcrumb) | |
| """ | |
| import re |
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
| # Grafana datasource provisioning: Tempo + Loki with trace-to-log linking. | |
| # | |
| # Drop in grafana/provisioning/datasources/ — Grafana loads it on startup. | |
| # | |
| # The `tracesToLogs.derivedFields` block is what makes the "jump from trace | |
| # to logs" button appear in the Tempo panel. Without it you can query Tempo | |
| # and Loki separately but there's no clickable link between a trace span | |
| # and its correlated log lines. The `filterByTraceID: true` appends | |
| # ?query={traceID="..."} automatically so you land on the right log lines. | |
| # |
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
| # --------------------------------------------------------------------------- | |
| # ssm_to_ec2 | |
| # --------------------------------------------------------------------------- | |
| ssm_to_ec2() { | |
| local name="${1:?usage: ssm_to_ec2 <Name-tag> [aws-profile]}" | |
| local profile="${2:-default}" | |
| local instance_id | |
| instance_id=$(aws ec2 describe-instances \ | |
| --profile "$profile" \ |
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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: api | |
| namespace: production | |
| spec: | |
| replicas: 3 | |
| strategy: | |
| type: RollingUpdate | |
| rollingUpdate: |
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
| # Drafts are posted to `review_channel` for a human to approve before | |
| # they land in the actual knowledge base. | |
| # | |
| # Agent script: autodoc-kb-updater.script.md | |
| # Requires: Slack MCP server, Claude | |
| # --------------------------------------------------------------------------- | |
| # Channels to monitor | |
| # --------------------------------------------------------------------------- | |
| channels: |
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 zsh | |
| # source from ~/.zshrc | |
| # Stopwatch (Ctrl-C to stop) — handles both GNU and BSD date | |
| timer() { | |
| local start=$(date +%s) | |
| echo "Timer started. Ctrl-C to stop." | |
| while true; do | |
| printf "\r%s" "$(date -u -d@$(($(date +%s)-start)) +%H:%M:%S 2>/dev/null \ | |
| || date -u -r$(($(date +%s)-start)) +%H:%M:%S)" |
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 | |
| # | |
| # Three patterns that save time every day: | |
| # | |
| # git-summary : one-line branch status (ahead/behind, staged, recent commits) | |
| # pre-push hook : lint only the files that changed — fast enough not to hate | |
| # commit-msg hook : auto-prepend ticket number extracted from branch name | |
| # | |
| # Setup: | |
| # source this file from ~/.zshrc for git-summary |
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
| # Tip: Injecting `circleci tests split` into a prebuilt orb job without | |
| # forking the orb. The split file list lands in $BASH_ENV before the orb's | |
| # own test command runs. | |
| # Requires: circleci/continuation@1 (Phase 1), circleci/node@5 (Phase 2) | |
| version: 2.1 | |
| parameters: | |
| run-web: { type: boolean, default: false } | |
| run-ios: { type: boolean, default: false } |
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| # Detect which workspaces changed | |
| changes: |
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 { createEvent } from 'ics'; | |
| const TIME_TO_HOUR: Record<string, number> = { | |
| 'early-morning': 6, 'morning': 9, 'afternoon': 14, 'evening': 18, | |
| }; | |
| const BLOCK_TO_MINS: Record<string, number> = { | |
| 'long-blocks': 120, 'medium-blocks': 75, 'short-blocks': 30, | |
| }; |
NewerOlder