Skip to content

Instantly share code, notes, and snippets.

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){
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>
import { Group } from "@mantine/core";
import { Calendar } from "@mantine/dates";
import * as React from "react";
const App = () => {
const currentDate = new Date();
const handleDateChange = (date) => {
@paulegan
paulegan / Code.gs
Created May 6, 2025 21:48
Apps Script for moving or copying Google Drive files (using Drive v3 for performance)
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')
@rxctionzz
rxctionzz / custom-webgl-layer-view.markdown
Created November 25, 2024 19:38
Custom WebGL layer view
@lmmx
lmmx / custom-instruction.md
Last active August 26, 2025 04:37
Custom instruction to make Claude Artifacts use persistent file identifiers and names

Custom instruction to make Claude Artifacts use persistent and distinct file identifiers in Projects

  • The title attribute of the <AntArtifact> XML tag becomes the file_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
Click to show earlier versions

0.0.1

@dedlim
dedlim / claude_3.5_sonnet_artifacts.xml
Last active September 2, 2025 19:55
Claude 3.5 Sonnet, Full Artifacts System Prompt
<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
@uroybd
uroybd / Inbox.md
Last active May 18, 2025 04:33
Obsidian Letter to Self.
title aliases created updated
Inbox
Inbox
2023-11-22 14:01:18 +0600
2023-11-23 08:49:57 +0600

Will Be Delivered soon…

// I am using Custom JS plugin to define common JS functions throughout the vault.
const {Formatters} = customJS;
{
"openapi": "3.0.3",
"info": {
"title": "weather.gov API",
"description": "weather.gov API",
"version": "1.11.1"
},
"servers": [
{
"url": "https://api.weather.gov",
@stephancasas
stephancasas / sonoma-text-insertion-point-downgrade.jxa.js
Created October 7, 2023 02:58
Disable Sonoma Text Insertion Point ("Cursor" / "Caret")
#!/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';