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
| {"name":"Demo","settings":"{\"settings\":\"{\\n \\\"window.zoomLevel\\\": 1,\\n \\\"breadcrumbs.enabled\\\": false,\\n \\\"editor.minimap.enabled\\\": false,\\n \\\"workbench.statusBar.visible\\\": false,\\n \\\"editor.fontSize\\\": 14,\\n \\\"window.title\\\": \\\" \\\",\\n \\\"cursor.composer.shouldChimeAfterChatFinishes\\\": true,\\n \\\"cursor.composer.shouldAllowCustomModes\\\": true,\\n \\\"workbench.editor.showTabs\\\": \\\"none\\\",\\n \\\"workbench.editor.editorActionsLocation\\\": \\\"hidden\\\",\\n \\\"workbench.editor.decorations.badges\\\": false,\\n \\\"workbench.editor.decorations.colors\\\": false,\\n \\\"workbench.editor.showModifiedIndicator\\\": false,\\n \\\"workbench.editor.highlightModifiedTabs\\\": false,\\n \\\"git.openRepositoryInParentFolders\\\": \\\"never\\\",\\n \\\"editor.fontLigatures\\\": true,\\n \\\"terminal.integrated.defaultProfile.osx\\\": \\\"zsh\\\",\\n \\\"cursor.enable_agent_window_setting\\\": false\\n}\"}","keybin |
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 { exec, spawn } from "child_process"; | |
| import { promisify } from "util"; | |
| const execAsync = promisify(exec); | |
| export interface CursorOptions { | |
| /** The prompt to send to the cursor agent */ | |
| prompt: string; | |
| /** System prompt to define AI behavior */ | |
| systemPrompt?: string; |
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
| goal: address PR comments | |
| - get PR comments | |
| ```bash | |
| # Find PR for current branch | |
| gh pr list --head $(git branch --show-current) | cat | |
| # Get inline comments (most important) | |
| gh api repos/:owner/:repo/pulls/PR_NUMBER/comments --jq '.[] | {author: .user.login, body: .body, path: .path, line: .line}' | cat |
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
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "type": "object", | |
| "required": ["mcpServers"], | |
| "properties": { | |
| "mcpServers": { | |
| "type": "object", | |
| "minProperties": 1, | |
| "additionalProperties": { | |
| "type": "object", |
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 | |
| START_DATE=$(date -v -$(($(date '+%u') + 6))d '+%Y-%m-%d') | |
| END_DATE=$(date -v -$(date '+%u')d '+%Y-%m-%d') | |
| GIT_LOG=$(git log --since="$START_DATE" --until="$END_DATE" --pretty=format:"%h %s" --no-merges) | |
| [ -z "$GIT_LOG" ] && { echo "No commits found."; exit 1; } | |
| PROMPT="In less than 200 characters, summarize the following git commit history to answer the question 'What did you get done this week?'. Answer in the style of Elon Musk. The reader is in a hurry, so make sure it's easy to digest quickly. Start with 'This week'. ':\n$GIT_LOG" |
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
| describe("withRetry", () => { | |
| it("should retry if when condition is true", async () => { | |
| const fn = jest | |
| .fn() | |
| .mockImplementationOnce(() => { | |
| throw new Error("Should throw"); | |
| }) | |
| .mockImplementationOnce(() => 1); | |
| let retryCount = 0; |
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 enum TextInputTypes { | |
| Raw, | |
| Parameter, | |
| } | |
| export type Primitive = string | number | boolean; | |
| export interface TextInputObject<Type extends TextInputTypes> { | |
| type: Type; | |
| value: Primitive; |
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
| class InternalError extends Error {} | |
| type Predicate<T> = (item: T) => boolean; | |
| function single<T>(array: T[], predicate?: Predicate<T>) { | |
| const items = predicate ? array.filter(predicate) : array; | |
| if (items.length !== 1) { | |
| throw new InternalError("Array does not contain exactly one item"); | |
| } |
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 { act, renderHook } from "@testing-library/react-hooks"; | |
| import { useArray } from "./useArray"; | |
| describe("useArray", () => { | |
| describe("props", () => { | |
| it("should have initial state", () => { | |
| const { result } = renderHook(() => | |
| useArray({ | |
| initialState: ["a", "b", "c"], |
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 React, { useCallback, useEffect, useRef, useState } from 'react' | |
| // Types to be shared with frontend and backend | |
| interface ApiResponseInfo { | |
| code: number | |
| message: string | |
| [key: string]: unknown | |
| } | |
| interface ApiResponseCommon { |
NewerOlder