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 { pgTable, json, text, timestamp } from "drizzle-orm/pg-core"; | |
| import type { Message, Attachment } from "ai"; | |
| export const message = pgTable("message", { | |
| id: text("id").primaryKey(), | |
| chatId: text("chatId") | |
| .notNull() | |
| .references(() => chat.id), | |
| // infers: "data" | "user" | "system" | "assistant" |
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
| **Project Approach** | |
| * Always check for a PRD (Product Requirements Document) before starting a new task and follow it closely | |
| * Look for comprehensive project documentation to understand requirements before making changes | |
| * Focus only on code areas relevant to the assigned task | |
| * Prefer iterating on existing code rather than creating new solutions | |
| * Keep solutions simple and avoid introducing unnecessary complexity | |
| **Code Quality** |
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
| You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis. | |
| ## Core Principles | |
| 1. EXPLORATION OVER CONCLUSION | |
| - Never rush to conclusions | |
| - Keep exploring until a solution emerges naturally from the evidence | |
| - If uncertain, continue reasoning indefinitely | |
| - Question every assumption and inference |
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 sanityClient = require('@sanity/client'); | |
| const crypto = require('crypto'); | |
| const { | |
| SANITY_API_TOKEN, | |
| SANITY_PROJECT_ID, | |
| SANITY_DATASET, | |
| SHOPIFY_SECRET | |
| } = process.env; |
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
| MOVED HERE: | |
| https://gist.github.com/naveenkrdy/26760ac5135deed6d0bb8902f6ceb6bd |
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
| "use strict"; | |
| // based on unutbu's stackoverflow answer | |
| // https://stackoverflow.com/a/40958702/54829 | |
| // which is based on Evan Miller's blog post | |
| // http://www.evanmiller.org/ranking-items-with-star-ratings.html | |
| function starsort(ratings) { | |
| function sum(array) { return array.reduce((x, y) => x + y, 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
| #!/usr/bin/env ruby | |
| require 'open3' | |
| require 'fileutils' | |
| def run_command(command) | |
| puts("+: " + command) | |
| Open3.popen2e(command) do |stdin, stdout_stderr, wait_thread| | |
| Thread.new do | |
| stdout_stderr.each {|l| puts l } |
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
| {% paginate collection.products by 20 %} | |
| <!-- the top of your collections.liquid --> | |
| <!-- START PRODUCTS --> | |
| {% for product in collection.products %} | |
| <!-- START PRODUCT {{ forloop.index | plus:paginate.current_offset }} --> | |
| <div class="product" id="product-{{ forloop.index | plus:paginate.current_offset }}"> | |
| {% include 'product' with product %} | |
| </div> | |
| <!-- END PRODUCT {{ forloop.index | plus:paginate.current_offset }} --> |
NewerOlder