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
| このコードベースを監査して。 | |
| 前提の解除: CLAUDE.md / SPEC / README は監査の「基準」ではなく「対象」。 | |
| 規約に従っているかではなく、規約・命名・設計前提そのものが正しいかを疑うこと。 | |
| プロジェクト自身のドキュメントを採点基準に使った瞬間、その監査は失敗している。 | |
| 観点: | |
| 1. 名前と実体 — 全ディレクトリ・クラス・用語について「ドキュメントを開かず、 | |
| 名前だけで何をするものか正しく分かるか」。他エコシステムから輸入されて | |
| 意味を失った慣習(Go の cmd/ 等)を指摘。 |
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 ruby | |
| require 'date' | |
| require 'optparse' | |
| require 'pathname' | |
| require 'json' | |
| require 'fileutils' | |
| # --- | |
| # 1. Option Parsing and Help |
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 SwiftUI | |
| // MARK: - Basic | |
| public struct CellLayout<Icon: View, Content: View, Accessory: View>: View { | |
| @State var cellHeight: CGFloat = 0 | |
| var horizontalGap: CGFloat | |
| var verticalGap: CGFloat |
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
| #if canImport(SwiftUI) && DEBUG | |
| import SwiftUI | |
| struct DebugJsonView: View { | |
| let json: JsonElement | |
| init(_ json: String) { | |
| self.json = JsonElement.parse(json) |
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 SwiftUI | |
| struct ContentView: View { | |
| var body: some View { | |
| ScrollView { | |
| LazyVStack { | |
| ForEach(0..<10000, id: \.self) { i in | |
| Text("No.\(i)") | |
| .padding() |
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 SwiftUI | |
| struct OffsetKey: PreferenceKey { | |
| static var defaultValue: CGFloat = .zero | |
| static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) { | |
| value = nextValue() | |
| } | |
| } | |
| struct ContentView: View { |
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 SwiftUI | |
| import Combine | |
| protocol InfinityScrollDataSource: AnyObject { | |
| associatedtype Element: Identifiable | |
| typealias Index = Int | |
| associatedtype ObjectWillChangePublisher : Publisher = ObservableObjectPublisher where ObjectWillChangePublisher.Failure == Never | |
| var count: Int { get } | |
| var objectWillChange: ObjectWillChangePublisher { get } |
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
| // | |
| // Camera.swift | |
| // CameraTest | |
| // | |
| import UIKit | |
| import CoreImage | |
| import VideoToolbox | |
| import AVFoundation |
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
| const validate = require('json-schema').validate; | |
| const YAML = require('yaml'); | |
| const fs = require('fs').promises; | |
| const main = async () => { | |
| const doc = YAML.parse(await fs.readFile('./doc.yml', { encoding: 'utf-8' })); | |
| const schema = YAML.parse(await fs.readFile('./schema.yml', { encoding: 'utf-8' })); | |
| console.log({ doc, schema }); | |
| console.log(validate(doc, schema)); | |
| } |
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
| const rollSingle = (face: number, rolled: number[]): number => { | |
| const r = Math.ceil(Math.random() * face) | |
| rolled.push(r) | |
| return r | |
| } | |
| const roll = (count: number, face: number, rolled: number[]): number => [...Array(count)].reduce(r => r + rollSingle(face, rolled), 0) | |
| globalThis.roll = roll |
NewerOlder