14
15* This is very inefficient. It refetches and re-parses blog.val.town on every single request, modulo some caching via the headers. It would be much more efficient to cache the results of fetching and parsing the Val Town blog, and then only re-fetch it every 10 minutes or so.
16* Instead of fetching and parsing HTML from super.so, we could get this same data from Notion's API, with a val like @stevekrouse.notionGetDatabase.
17
18Migrated from folder: Archive/blogRSS
1# datascript example
2
3An example using tonsky’s [datascript](https://github.com/tonsky/datascript) module, which implements a datalog-style database in JavaScript. The module itself is really written in ClojureScript, but they've helpfully produced an npm-compatible module for us to use. [Datalog](https://en.wikipedia.org/wiki/Datalog) languages are fascinating, and have some real-world use in Roam Research and Logseq.
1# Get a DuckDB database
2
3This method sets up a [duckdb-wasm](https://github.com/duckdb/duckdb-wasm) database that you can then use to store and retrieve data.
5- They're shorter, with a more customizable alphabet.
6- They use more different characters by default.
7- Unlike UUIDs, there aren't custom types for nanoids in databases
8- Nanoids never contain information. UUIDs sometimes do: some UUIDs contain timestamps and MAC addresses.
9
1# Poll Twitter & Populate SQlite database
2
3The twitter API (or in this case someone else's wrapper over the twitter API) is finicky, so we just try to get one handle per minute, and shove whatever we get into our database, which could be an error message (this is why handles don't have a unique index).
4
5Migrated from folder: Archive/turso/twitterFollows/populateTwitterDB
1# Example Hosted SQLite on Turso
2
3Creates a database of twitter users and followers
4
5Requires `tursoURL` and `tursoToken` in your secrets.
1Migrated from folder: External_APIs/notion/notionGetDatabaseEditedAfter
1Migrated from folder: External_APIs/DateMeDocs/DateMeNotion/getDateMeDatabase
1# Get all the pages in a notion database
2
3## Usage
4
51. Find your `databaseId`: https://developers.notion.com/reference/retrieve-a-database
62. Get `auth` by setting up an internal integration: https://developers.notion.com/docs/authorization#internal-integration-auth-flow-set-up
7
8Example usage: @stevekrouse.dateMeNotionDatabase
9
10deno-notion-sdk docs: https://github.com/cloudydeno/deno-notion_sdk
11
12Migrated from folder: External_APIs/notion/notionGetDatabase
1Migrated from folder: Archive/docsExamples/persistence/databaseVal