- Shift + tab + tab
- Use “opus” for planning and Sonnet for everything else, /model
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
| @cursor-tasks.md Go through each story and task in the cursor-tasks.md file. Find the next story to work on. Review each unfinished task, correct any issues or ask for clarifications (only if absolutely needed!). Then proceed to create or edit files to complete each task. After you complete all the tasks in the story, update the file to check off any completed tasks. Run builds and commits after each story. Run all safe commands without asking for approval. Continue with each task until you have finished the story, then stop and wait for me to review. |
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
| // Types for the result object with discriminated union | |
| type Success<T> = { | |
| data: T; | |
| error: null; | |
| }; | |
| type Failure<E> = { | |
| data: null; | |
| error: E; | |
| }; |
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
| -- Query the API directly and flatten the nested JSON structure | |
| WITH raw_data AS ( | |
| SELECT * FROM read_json_auto('https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed?actor=did:plc:edglm4muiyzty2snc55ysuqx&limit=10') | |
| ), | |
| unnested_feed AS ( | |
| SELECT unnest(feed) as post_data FROM raw_data | |
| ) | |
| SELECT | |
| -- Post basics | |
| post_data.post.uri as post_uri, |
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 json | |
| import os | |
| import duckdb | |
| import boto3 | |
| import datetime | |
| from typing import Any, Dict | |
| def construct_prepared_sql_and_params(sql_template, bind_params): | |
| single_value_params = {k: v for k, v in bind_params.items() if not isinstance(v, list)} |
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 AWS = require("aws-sdk"); | |
| const csv = require("csv-parser"); | |
| const { Readable } = require("stream"); | |
| const simpleParser = require("mailparser").simpleParser; | |
| const s3 = new AWS.S3(); | |
| const documentClient = new AWS.DynamoDB.DocumentClient(); | |
| const TableName = process.env.TABLE; |
- Install (TinyMCE 5.x)
npm install --save tinymce @tinymce/tinymce-react copy-webpack-plugin- Copy static files(tinymce skins) to
publicfolder. Edit filenext.config.js
const path = require('path');
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
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
| //! How to get all records from a Dynamo DB Table and store as regular JSON | |
| // 1. Run the following command in the terminal | |
| // * Note that the output will be in Dynamo JSON format | |
| // aws dynamodb scan --region REGION --profile PROFILE_NAME --table-name TABLE_NAME > exports.json | |
| // 2. Convert from Dynamo JSON to regular JSON. | |
| const AWS = require('aws-sdk') | |
| const fs = require('fs') |
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
| # Near Simplest Language model API, with room to expand! | |
| # runs GPT-J-6B on 3090 and TITAN and servers it using FastAPI | |
| # change "seq" (which is the context size) to adjust footprint | |
| # | |
| # seq vram usage | |
| # 512 14.7G | |
| # 900 15.3G | |
| # uses FastAPI, so install that | |
| # https://fastapi.tiangolo.com/tutorial/ |
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
| { | |
| "basics": { | |
| "name": "Your first and last name", | |
| "label": "", | |
| "picture": "", | |
| "email": "Your email address", | |
| "phone": "A phone number, with any formatting you like. E.g. (555) 555-5555.", | |
| "degree": "", | |
| "website": "Your website URL", | |
| "summary": "A one-sentence to one-paragraph overview text. Do not include any line-breaks.", |
NewerOlder