flowchart TD
%% Main Entry Point and Initialization
Start([Application Start]) --> ParseArgs[Parse Command Line Arguments]
ParseArgs --> CheckStdin{Check stdin}
CheckStdin -->|Input Piped| ProcessPiped[Process Piped Input]
CheckStdin -->|Interactive Mode| CheckAuth{Authentication Status}
%% Authentication Flow
CheckAuth -->|Not Authenticated| OAuthFlow[OAuth Authentication]
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
| <artifacts_info> | |
| The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity. | |
| # Good artifacts are... | |
| - Substantial content (>15 lines) | |
| - Content that the user is likely to modify, iterate on, or take ownership of | |
| - Self-contained, complex content that can be understood on its own, without context from the conversation | |
| - Content intended for eventual use outside the conversation (e.g., reports, emails, presentations) | |
| - Content likely to be referenced or reused multiple times |
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
| # Testing process to expand k8s PVCs without losing data | |
| #region Install | |
| # Check the current cluster | |
| kubectl config current-context | |
| # Add bitnami repo | |
| helm repo list | |
| helm repo add bitnami https://charts.bitnami.com/bitnami |
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
| // @ts-nocheck //TODO: enable remove once there are typings in place | |
| // TODO: uncomment all three eslint() occurrences once eslint warnings and errors are fixed | |
| // for info on emitCSS etc. https://github.com/rollup/rollup-plugin-svelte#extracting-css and https://svelte.dev/docs#svelte_preprocess | |
| // import { eslint } from 'rollup-plugin-eslint' | |
| import { terser } from 'rollup-plugin-terser' | |
| import babel from 'rollup-plugin-babel' | |
| import commonjs from 'rollup-plugin-commonjs' | |
| import config from 'sapper/config/rollup.js' | |
| import environmentVariables from './config/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
| import * as React from "react"; | |
| type ThemeConfig = "system" | "light" | "dark"; | |
| type ThemeName = "light" | "dark"; | |
| // Custom themes are keyed by a unique id. | |
| type KeyedThemes = { | |
| [k: string]: { | |
| config: ThemeConfig; | |
| themeName: ThemeName; | |
| }; |
- Create a file
Image.jsfrom the source below (it is almost a copy of Image.js from tiptap-extensions except that it has a constructor that acceptsuploadFunc(function to be called withimagebeing uploaded) and additional logicif(upload) { ... } else { ... previous base64 logic .. }in thenew Pluginsection.
import {Node, Plugin} from 'tiptap'
import {nodeInputRule} from 'tiptap-commands'
/**
* Matches following attributes in Markdown-typed image: [, alt, src, title]
*
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 canvasSketch = require('canvas-sketch'); | |
| const { renderPaths, createPath, pathsToPolylines } = require('canvas-sketch-util/penplot'); | |
| const { clipPolylinesToBox } = require('canvas-sketch-util/geometry'); | |
| const Random = require('canvas-sketch-util/random'); | |
| const settings = { | |
| dimensions: [ 12, 12 ], | |
| orientation: 'landscape', | |
| pixelsPerInch: 300, | |
| scaleToView: true, |
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
| // License: Polyform Non Commercial 1.0.0 | |
| // https://polyformproject.org/licenses/noncommercial/1.0.0/ | |
| const canvasSketch = require('canvas-sketch'); | |
| const Random = require('canvas-sketch-util/random'); | |
| const Color = require('canvas-sketch-util/color'); | |
| const { linspace, lerp } = require('canvas-sketch-util/math'); | |
| const risoColors = require('riso-colors').map(h => h.hex).filter(c => { | |
| const hex = Color.parse(c).hex.toLowerCase(); | |
| return hex !== '#000000' && hex !== '#ffffff' | |
| }); |
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
| // We'll use an npm module here (probably won't be possible in the Figma plugin...) | |
| import triangulate from 'delaunay-triangulate'; | |
| // Export your generative program | |
| export default { | |
| props: { | |
| // Number of points (e.g. 1D data structure) | |
| shape: 125 | |
| }, | |
| // Here the 'vertex' shader generates random points in 2D |
NewerOlder