View gist:34afe44ad4d7fdbf264f8c3003888460
This file contains 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 express = require("express"); | |
const axios = require('axios'); | |
const app = express(); | |
app.use(express.json()); | |
const defaultFactor = 2.5 | |
const defaultInterval = 2 | |
const generateOutput = ({ factor, interval, due }) => |
View gist:cafda00d5104fdcc73004c3288514c55
This file contains 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
var express = require("express"); | |
var http = require("http"); | |
var app = express(); | |
const prompt = (context) => ` | |
TASK: Extract information from CONTEXT | |
OUTPUT FORMAT: as a JSON structure following the TYPESCRIPT DEFINITION. Output only a valid JSON structure. | |
type Node = { |
View index.js
This file contains 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 express = require("express"); | |
const app = express(); | |
app.use(express.json()); | |
const defaultFactor = 2.5 | |
const defaultInterval = 2 | |
const generateOutput = ({ factor, interval, due }) => | |
`[[date:${due.toISOString().slice(0, 10)}]] ${factor}/${interval}`; |
View gist:6a16060ee086d7218bc571945c237172
This file contains 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
- #[[Twitter thread]] [[Cedric Chin]]: Increasingly curious as to why the tools-for-thought folk talk a lot about note-taking tool features and plugins and not at all about the cognitive science of better externalised thinking. [*](https://twitter.com/ejames_c/status/1489418153449123841) | |
- An example of why paying attention to the cognitive science is important: | |
- https://twitter.com/add_hawk/status/1489001641051262981 [*](https://twitter.com/ejames_c/status/1489458699307728899) | |
- Also relevant: https://link.springer.com/article/10.1007/s00146-010-0272-8 [*](https://twitter.com/ejames_c/status/1489500343092547584) | |
- Also relevant (though this one demands some understanding of cognitive flexibility theory, and why learning in ill-structured domains is markedly different from structured domains): https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.89.4385&rep=rep1&type=pdf [*](https://twitter.com/ejames_c/status/1489511021018750980) | |
- For the record, I’m genuinely interested in thi |
View Advanced queries for Logseq
This file contains 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
- This page is a collection of some of the Advanced queries from the [[Datalog]] channel on the [[Logseq/Discord]] server. #datalog | |
id:: 61db13f4-75e8-4f87-ad60-3ac3479c5fc8 | |
- ### Resources | |
- [link: The first message on the datalog channel](https://discord.com/channels/725182569297215569/743139225746145311/743139795865174119) | |
- [link: Logseq docs - Advanced queries](https://docs.logseq.com/#/page/advanced%20queries) | |
- [link: Logseq datascript schema](https://gist.github.com/tiensonqin/9a40575827f8f63eec54432443ecb929) | |
- [link: Logseq frontend db model](https://github.com/logseq/logseq/blob/master/src/main/frontend/db/model.cljs) | |
- [link: How to Graph Your Data - talk by Paula Gearon](https://youtu.be/tbVwmFBnfo4) | |
- [link: Domain modelling with datalog - talk by Norbert Wojtowicz](https://youtu.be/oo-7mN9WXTw) | |
- [link: Athens Research ClojureFam](https://github.com/athensresearch/ClojureFam) |
View gist:93a320a5b3d447d13613735be2d68bec
This file contains 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
// MIT Licensed | |
// Author: jwilson8767 | |
/** | |
* Waits for an element satisfying selector to exist, then resolves promise with the element. | |
* Useful for resolving race conditions. | |
* | |
* @param selector | |
* @returns {Promise} | |
*/ |
View gist:a4c556fe20bd258f498b7af4d7740045
This file contains 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
- {{[[roam/css]]}} | |
- ```css | |
.roam-block-container>.rm-block-children { | |
margin-left: 0px; | |
} | |
.rm-level-0 > .rm-multibar { | |
left: 0px; | |
} | |
.rm-level-1 > .rm-multibar { | |
left: -8px; |
View test.clj
This file contains 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
(ns myTablev03 | |
(:require | |
[reagent.core :as r] | |
clojure.pprint | |
[datascript.core :as d] | |
[roam.datascript.reactive :as dr])) | |
(defn rand-str [len] | |
(apply str (take len (repeatedly #(char (+ (rand 26) 65)))))) |
View srs.css
This file contains 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
- Hide tags with [[css/minimal]] | |
- ```css | |
#min-title = hides the page reference link / page title | |
#min-con = hides the contextual reference information (breadcrumbs) | |
#minimal = hides both the title and the context | |
#min-q = hides the query string, similar to legacy behavior | |
#min-all = hides everything — title, context, and query string | |
inspired by Matt Goldenberg */ |
View gist:15a3a29530be8501ee6e994d2cc2c811
This file contains 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 addFavicons = () => { | |
let filtered = Array.prototype.filter.call(document.querySelectorAll('.roam-body a'), a => { | |
return a.hostname && a.hostname !== document.location.hostname; | |
}); | |
Array.prototype.forEach.call(filtered, a => { | |
if (a.text == "*") { | |
a.style.background = `url(https://www.google.com/s2/favicons?sz=16&domain=${a.hostname}) right center no-repeat`; | |
a.style.paddingRight = "18px"; | |
} else { | |
a.style.background = `url(https://www.google.com/s2/favicons?sz=16&domain=${a.hostname}) left center no-repeat`; |
NewerOlder