Skip to content

Instantly share code, notes, and snippets.

View foeken's full-sized avatar

Andre Foeken foeken

  • Nedap
  • Groenlo, The Netherlands
View GitHub Profile
// Name: OpenAI Replace
// Description: Replace using Open AI's API
// Shortcut: cmd ctrl s
import "@johnlindquist/kit"
let { Configuration, OpenAIApi } = await npm("openai")
let configuration = new Configuration({
apiKey: await env("OPENAI_API_KEY"),
@foeken
foeken / openai-replace.js
Created November 28, 2022 15:24
ScriptKit OpenAI script for Tana
// Name: OpenAI Replace
// Description: Replace using Open AI's API
// Shortcut: cmd ctrl s
import "@johnlindquist/kit"
let { Configuration, OpenAIApi } = await npm("openai")
let configuration = new Configuration({
apiKey: await env("OPENAI_API_KEY"),
// Name: OpenAI Replace
// Description: Replace using Open AI's API
// Shortcut: cmd ctrl s
import "@johnlindquist/kit"
let { Configuration, OpenAIApi } = await npm("openai")
let configuration = new Configuration({
apiKey: await env("OPENAI_API_KEY"),
// Name: OpenAI Replace
// Description: Replace text with Open AI's API
// Shortcut: command ctrl s
import "@johnlindquist/kit"
let { Configuration, OpenAIApi } = await npm("openai")
let configuration = new Configuration({
:has(span[data-tag="quote"]):not(.expandedNodeContent) > .listContentItem,
:has(span[data-tag="block-quote"]):not(.expandedNodeContent) > .listContentItem {
background-color: var(--colorReferenceMentionBackground);
border-left: 5px solid var(--colorUIStroke);
border-left-width: 3px;
border-radius: 3px;
padding: 8px 14px;
}
:has(span[data-tag="delegated"]):not(.expandedNodeContent) > span[data-role="editable"]:before {
@foeken
foeken / tana.css
Last active November 9, 2023 08:45
/* ==UserStyle==
@name app.tana.inc - 10/21/2022, 9:02:58 PM
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A new userstyle
@author Me
==/UserStyle== */
@-moz-document domain("app.tana.inc") {
:root {
--bulletDiameterInner: 6px;
# GO TO START HERE ---------------------------------------------------------------------------
require "JSON"
require "securerandom"
require "date"
filename = ARGV[0]
string = File.read(filename)
json = JSON.parse(string)
/* Define this only once, you can rename 'section' to any supertag you want to style */
.listContentItem:has(span[data-tag="section"]) .inlinerefnode span {
background-color: inherit !important;
color: white;
border: none;
}
/*
Per specific reference inside the supertag, you can define different colors.
@foeken
foeken / enrich.rb
Created October 23, 2022 14:36
A Ruby based enricher the Tana Intermediate Format
# RUN: ruby filter.rb original.tif.json original.enriched.json
# GO TO START HERE ---------------------------------------------------------------------------
require "JSON"
require "securerandom"
filename = ARGV[0]
string = File.read(filename)
json = JSON.parse(string)
@foeken
foeken / roam.css
Created May 1, 2021 05:42
Zettelkasten CSS
//First the Better Roam Research with Custom font
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700;800&display=swap');
@import url("https://linuz90.github.io/better-roam-research/src/css/main.css");
body,
div,
textarea,
.level2 {
font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif !important; }