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 ROWS=6,COLS=7,MATCH=4 | |
const App = () => { | |
const [maze,setMaze]=React.useState(Array.from({length:ROWS},()=>Array.from({length:COLS},()=>null))) | |
// const [maze,setMaze]=React.useState([[null, null, null, null, null, null, null],[null, null, null, null, null, null, null],[null, null, null, null, null, null, null],[null, null, null, null, null, null, null],[null, null, null, null, null, null, null],[0, 0, 0, null, null, null, 1]]) | |
const [turn,setTurn]=React.useState("blue") | |
const [winner,setWinner]=React.useState(null) | |
const MAX_TURN=ROWS*COLS | |
function totalTurns(){ | |
let total=0 | |
for(let i=0;i<maze.length;++i){ |
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
mport { Button, Card, Image, Text } from "@nextui-org/react"; | |
export default function App() { | |
return ( | |
<Card css={{ mw: "400px" }}> | |
{/* center it */} | |
<Card.Body css={{ textAlign: "center" }}> | |
<Text h2>Cross Browser Testing</Text> |
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 { Group } from "@mantine/core"; | |
import { Calendar } from "@mantine/dates"; | |
import * as React from "react"; | |
const App = () => { | |
const currentDate = new Date(); | |
const handleDateChange = (date) => { |
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 PROCESS_FILE_DATE_THRESHOLD = new Date(2020, 1, 1) | |
const PROCESS_FILE_DESTINATION = 'xxx' | |
const PROCESS_FILE_CHUNK_SIZE = 100 | |
const ADMIN_USER = 'user@domain.com' | |
// Defines criteria for processing each file | |
function shouldProcessFile(f) { | |
return new Date(f.modifiedTime) < PROCESS_FILE_DATE_THRESHOLD && f.ancestors.some(i => i.id == '1gJGndPkdUq5md61phIU2iiL6pHcMmO79') | |
// Could also use criteria like f.mimeType.includes('pdf') |
Custom instruction to make Claude Artifacts use persistent and distinct file identifiers in Projects
- The
title
attribute of the<AntArtifact>
XML tag becomes thefile_name
attribute when 'Add to Project' is clicked. - Since Claude defaults to a human-readable
title
(e.g. "Modified Web Page With New Features"), this will tend to change the filename in the Project - It's easier to keep a single file copy in your Project docs ("Project Knowledge") when the file names are persistent in this way
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
<artifacts_info> | |
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity. | |
# Good artifacts are... | |
- Substantial content (>15 lines) | |
- Content that the user is likely to modify, iterate on, or take ownership of | |
- Self-contained, complex content that can be understood on its own, without context from the conversation | |
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations) | |
- Content likely to be referenced or reused multiple times |
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
{ | |
"openapi": "3.0.3", | |
"info": { | |
"title": "weather.gov API", | |
"description": "weather.gov API", | |
"version": "1.11.1" | |
}, | |
"servers": [ | |
{ | |
"url": "https://api.weather.gov", |
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 osascript -l JavaScript | |
const App = Application.currentApplication(); | |
App.includeStandardAdditions = true; | |
const kCFPrefsFeatureFlagsDir = '/Library/Preferences/FeatureFlags/Domain'; | |
const kCFPrefsFeatureEnabledKey = 'Enabled'; | |
const kUIKitDomainPrefsTemporaryPath = '/tmp/UIKit.plist'; | |
const kUIKitRedesignedTextCursorKey = 'redesigned_text_cursor'; |
NewerOlder