Skip to content

Instantly share code, notes, and snippets.

View toy-crane's full-sized avatar

hanwool kim toy-crane

View GitHub Profile
@toy-crane
toy-crane / type-check.py
Created July 28, 2025 09:31
Type check hook example
import json
import sys
import subprocess
import re
try:
input_data = json.loads(sys.stdin.read())
except json.JSONDecodeError as e:
print(f"Error: {e}")
sys.exit(1)
{
"hooks": {
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "afplay /System/Library/Sounds/Glass.aiff"
}
]
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "yarn format"
}
@toy-crane
toy-crane / settings.json
Created July 14, 2025 07:33
Claude Code 작업 완료 알림 받기
{
"hooks": {
"Notification": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "terminal-notifier -title 'Claude Code' -message 'Waiting for your input' -sound Glass"
}
import * as Updates from 'expo-updates';
import * as SplashScreen from 'expo-splash-screen';
import { useEffect, useState } from 'react';
import { View, Text, StyleSheet } from 'react-native';
// 스플래시 화면 유지
SplashScreen.preventAutoHideAsync();
export default function App() {
const [appIsReady, setAppIsReady] = useState(false);
{
"key": "cmd+enter",
"command": "runCommands",
"args": {
"commands": [
{
"command": "git.stageAll"
},
{
"command": "cursor.generateGitCommitMessage"
@toy-crane
toy-crane / toss-frontend-rules.mdc
Last active July 29, 2025 07:10
토스 프론트엔드 가이드라인 기반으로 만든 Cursor rule
# Frontend Design Guideline
This document summarizes key frontend design principles and rules, showcasing
recommended patterns. Follow these guidelines when writing frontend code.
# Readability
Improving the clarity and ease of understanding code.
@toy-crane
toy-crane / index.ts
Last active February 11, 2025 07:05
How to create a title
import { createClient } from "https://esm.sh/@supabase/[email protected]";
import { generateObject, generateText, Output } from "npm:ai";
import { openai } from "npm:@ai-sdk/openai";
import { z } from "npm:zod";
const TitleOutput = z.object({
summary: z.string().describe(
"대화에서 다룬 내용을 바탕으로 간단한 요약을 알려주세요",
),
partner: z.string().describe(
<select name="choice">
<option value="banana">바나나</option>
<option value="apple">사과</option>
<option value="orange">오렌지</option>
</select>
<style>
.container {
margin: 1em 0;
background-color: #c2edc8;
display: flex;
flex-direction: row;
}
.box {
padding: 1em;