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 python3 | |
| """Read-only check for the Claude Code extension 2.1.313 backdoor indicators. | |
| Run: python3 claude_code_compromise_check.py | |
| Works with Python 3.8+ on macOS, Windows, and Linux. Checks the current user. | |
| Exit codes: 2 = indicator found; 1 = no indicator found but a check failed; | |
| 0 = no indicator found in the locations checked. | |
| Sources: https://cursor.com/blog/claude-code-extension-security-notice | |
| https://phorion.io/blog/offical-claude-code-vsx-compromise/ |
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
| {{/* | |
| Responsive Image Partial - Full Width Hero Headers | |
| Generates a <picture> with WebP and JPEG srcsets for full-width hero headers. | |
| Only processes images with "-2000w" in the filename. | |
| Other images are used as-is from static directory. | |
| Usage: {{ partial "func/responsive-image.html" . }} | |
| Generates sizes: 400w, 800w, 1200w, 1600w, 2000w |
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
| This is a valid and important code review comment. The current implementation has a potential flaw that could lead to incorrect path normalization, and the suggested solution is much more robust. | |
| Here's my thinking: | |
| The Problem is Real: The current code uses indexOf("/photostructure/src/") to find what it assumes is the project's source directory. If a user's library path was something like /media/nas/photos/my-photostructure/src/, the code would incorrectly shorten the path, which could lead to unexpected behavior or errors. | |
| The Solution is Sound: The suggestion to use a method that reliably finds the repository root and then calculates the relative path from there is the correct approach. It avoids making assumptions about the directory structure outside of the project itself. | |
| I will now implement the suggested change. I'll start by creating a plan to address this. |
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 -e | |
| # Renamed a file or method? Use this to add all files matching that regex pattern. | |
| # Assumes this file lives in $ROOT/bin, so we need to hop up a level (the `/..` bit) | |
| ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null 2>&1 && pwd)" | |
| cd "$ROOT" | |
| # Ignore calls to `git add` that have no filenames: | |
| git config advice.addEmptyPathspec 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
| #!/bin/sh | |
| # Stage all diffs found in currently staged files | |
| # This is useful if you've got a set of files ready to commit, but edited one | |
| # or more of them (via prettier, delinting, deleting debug statements, adding | |
| # more tests, ...), and want to make sure those changes are included. | |
| # Usage: `git restage` |
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
| export type SyncOrAsync<T> = T | Promise<T> | |
| export type Maybe<T> = T | undefined | |
| export type MaybeSyncOrAsync<T> = Maybe<SyncOrAsync<Maybe<T>>> | |
| /** | |
| * Serialized promise gathering and compaction | |
| */ | |
| export async function thenCollect<T1, T2>( | |
| arr: MaybeSyncOrAsync<MaybeSyncOrAsync<T1>[]>, | |
| f: (t: T1) => MaybeSyncOrAsync<T2> |
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
| export const Directions = strEnum("North", "South", "East", "West") | |
| export type Direction = StrEnumKeys<typeof Directions> |
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
| # | |
| # Hello! | |
| # | |
| # These are settings for PhotoStructure, and are formatted using TOML. See | |
| # <https://github.com/toml-lang/toml>. | |
| # | |
| # NOTE: Please shut down PhotoStructure before editing this file. | |
| # | |
| # Most settings have reasonable defaults, which are provided after the |
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
| sudo -u photostructure bash | |
| cd ~photostructure | |
| git clone https://github.com/photostructure/photostructure-for-servers.git |
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
| export function $$<T extends HTMLElement = HTMLElement>(selector: string) { | |
| return document.querySelectorAll<T>(selector) | |
| } | |
| export function blank(o: any): o is undefined { | |
| if (o == null) return true | |
| const s = String(o) | |
| return s.length === 0 || s.trim().length === 0 | |
| } |
NewerOlder