See https://putzisan.com/articles/derive-rsa-public-key-from-private-key-web-crypto for more information.
This repository contains a reusable function leveraging async generators to stream real-time responses from OpenAI's ChatGPT API, word by word, in a Node.js environment. Instead of waiting for the entire response to be generated, this function allows for an interactive experience where the AI's thoughts are streamed as they are produced.
- Node.js 18.14 or higher (since we're using nodejs native fetch)
- A valid API key for OpenAI's ChatGPT
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 orderMachine = Machine({ | |
id: "createOrder", | |
initial: "cart", | |
states: { | |
cart: { | |
on: { | |
NEXT: "customer" | |
} | |
}, | |
customer: { |
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 resolveConfig = require("tailwindcss/lib/util/resolveConfig").default; | |
const defaultConfig = require("tailwindcss/defaultConfig"); | |
const _ = require("lodash"); | |
// const customPlugins = require("./tailwind-custom-plugins"); | |
const path = require("path"); | |
const appDir = path.dirname(require.main.filename); | |
const userConfigPath = path.join(appDir, "tailwind.config.js"); | |
const config = resolveConfig([ | |
// if you want to use your custom config then uncomment following line: |
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
function alignContent({ addUtilities, variants }) { | |
addUtilities( | |
{ | |
".align-content-start": { | |
"align-content": "flex-start" | |
}, | |
".align-content-end": { | |
"align-content": "flex-end" | |
}, | |
".align-content-center": { |
A npx-utility for creating a storybook-story for your existing react-component.
$ npx https://gist.github.com/PutziSan/7621bb69364fcf95409264261b77887c src/MyComponent.tsx
npx: installed 1 in 6.294s
write new story into src/MyComponent.stories.tsx
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 esprima = require("esprima"); | |
const Purgecss = require("purgecss"); | |
const LastCallWebpackPlugin = require("last-call-webpack-plugin"); | |
class Emitter extends require("events") {} | |
// by https://github.com/FullHuman/purgecss-from-js/blob/master/index.js | |
class PurgeFromJS { | |
static extract(content) { | |
const tokens = esprima.tokenize(content); |
- React callback-hell => das wird zu nested funktonsaufrufen durch react (siehe wenn man reacttree mit babel umrechneb lässt) *das könnte man mit
compose
machen - Provider sollten read-onky sein, ctx also nicht bearbeitbar,
- Fotms (fotmik-field) => setter nicgt in komponenten reingeben, sondern in der eltern-komponenete das onchange reingeben, ansonsten verändert das.kund sein Elternteil was zu sehr und sinnlos die app verschränkt und verwirrend macht
- Insgesamt sollte optimalerweise ausschließlich mit generellen Events(onchangs, onload) gearbeitet werden und due eltern-komponenten sollten das für sich entsprechend implementieren => *ein setter sokltr niemals an eun.kind weitergegeben werden sindern immer nur mut inconchange subscriben sodass das kind keine ahnujg haben mhss was ltztendlicg implementiert wird
zb dropdown:
inout => load Vorschläge von db => dropdown miz values znd.onchangr,
Notes for learning haskell
weitermachen bei http://learnyouahaskell.com/recursion
notes from the help
-cmd-tool (haskell landing-page) + learnyouahaskell.com
- E-V-E-R-Y-T-H-I-N-G is a function