cerebras_coderindex2 matches
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
45async function servePublicFile(path: string): Promise<Response> {
syncBookmarksREADME.md2 matches
1Downloads an export of all my bookmarks from Raindrop.io and syncs the URLs and created dates into an SQLite database. Runs every day.
23Used to power https://www.val.town/v/s3thi/stumbleDrop. Database schema is managed using https://www.val.town/v/s3thi/bookmarksDatabase.
stumbleDropREADME.md1 match
3Powered by:
45- https://www.val.town/v/s3thi/bookmarksDatabase to define the schema for the SQLite database that holds a copy of my bookmarks
6- https://www.val.town/v/s3thi/syncBookmarks to sync bookmarks from Raindrop.io on a set interval
cerebras_coder_archivedindex2 matches
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
45async function servePublicFile(path: string): Promise<Response> {
sqliteExplorerAppREADME.md1 match
30- [ ] add triggers to sidebar
31- [ ] add upload from SQL, CSV and JSON
32- [ ] add ability to connect to a non-val town Turso database
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
task_managermain.tsx4 matches
14}
1516// DatabaseContent component
17function DatabaseContent({ data }: { data: Action[] }) {
18return (
19<pre className="bg-white dark:bg-gray-800 p-4 rounded-lg shadow-md overflow-auto dark:text-white border border-gray-200 dark:border-gray-700">{JSON.stringify(data, null, 2)}</pre>
219className="bg-green-500 hover:bg-green-600 text-white font-medium py-2 px-4 rounded-md mb-4 transition duration-200 dark:bg-green-600 dark:hover:bg-green-700"
220>
221{showDbContent ? 'Hide' : 'Show'} Database Content
222</button>
223{showDbContent && (
224<div className="mt-4">
225<DatabaseContent data={dbContent} />
226</div>
227)}
VOTelCollectormain.tsx9 matches
17} from "https://esm.sh/@opentelemetry/otlp-transformer@0.55.0";
18import { and, desc, relations, sql } from "https://esm.sh/drizzle-orm@0.39.3";
19import { drizzle, type LibSQLDatabase } from "https://esm.sh/drizzle-orm@0.39.3/libsql";
20import { integer, sqliteTable, text } from "https://esm.sh/drizzle-orm@0.39.3/sqlite-core";
21import { Hono } from "https://esm.sh/hono@4.7.0";
2526/******************************************************************
27* Database and Drizzle setup
28* ****************************************************************/
2939// (remember to remove "IF NOT EXISTS")
40// https://docs.val.town/std/sqlite/migrations/
41const migrateDatabase = async () => {
42await sqlite.execute(`
43CREATE TABLE IF NOT EXISTS \`otel_spans\` (
49};
5051// HACK - Migrate database on startup
52await migrateDatabase();
5354/******************************************************************
61};
62Variables: {
63db: LibSQLDatabase<typeof schema>;
64};
65};
6869/**
70* Middleware for setting up the database
71* and storing it on the Hono app's context
72*/
335"value": {
336"stringValue":
337"{\"OPENAI_API_KEY\":\"sk-proj-uoRQ71Oaz16IbDJRJXY5T3BlbkFJgqSSf3Xglg0V0V2FhFrO\",\"ANTHROPIC_API_KEY\":\"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\",\"DATABASE_URL\":\"postgresql://neondb_owner:XaenL6g5WApI@ep-proud-grass-a5r8g74c.us-east-2.aws.neon.tech/neondb?sslmode=require\",\"FPX_ENDPOINT\":\"http://localhost:8788/v1/traces\",\"FPX_LOG_LEVEL\":\"debug\",\"GOOSE_AVATARS\":{}}",
338},
339},
785"key": "fpx.http.request.env",
786"value": {
787"stringValue": "{\"OPENAI_API_KEY\":\"sk-proj-uoRQ71Oaz16IbDJRJXY5T3BlbkFJgqSSf3Xglg0V0V2FhFrO\",\"ANTHROPIC_API_KEY\":\"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\",\"DATABASE_URL\":\"postgresql://neondb_owner:XaenL6g5WApI@ep-proud-grass-a5r8g74c.us-east-2.aws.neon.tech/neondb?sslmode=require\",\"FPX_ENDPOINT\":\"http://localhost:8788/v1/traces\",\"FPX_LOG_LEVEL\":\"debug\",\"GOOSE_AVATARS\":{}}"
788}
789},
bitcoinMinerAppmain.tsx2 matches
2324useEffect(() => {
25const initializeDatabase = async () => {
26const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
27const KEY = "bitcoinMinerApp";
4647const miningInterval = setInterval(mine, 60000); // Guaranteed 1 ETH per minute
48initializeDatabase();
4950return () => clearInterval(miningInterval);
AlwaysHeremain.tsx1 match
447448// Here you could implement additional logic like:
449// - Saving conversation to a database
450// - Sending conversation via email
451// - Generating a summary
InstantQueryApp1 match
25const query = JSON.parse(results!);
2627// In a real application, you would use the query to fetch data from the database
28// For this example, we'll just return the query itself
29return new Response(JSON.stringify({ query, results: "Sample results would go here" }), {