Skip to content

Instantly share code, notes, and snippets.

View Konard's full-sized avatar
🖥️
Watch how I code at https://www.youtube.com/c/КонстантинДьяченко

Konstantin Diachenko Konard

🖥️
Watch how I code at https://www.youtube.com/c/КонстантинДьяченко
View GitHub Profile
@Konard
Konard / client-handler-example.md
Last active March 15, 2024 08:34
Simplest possible client handler example for Deep. It can be installed as a package into Deep instance: https://www.npmjs.com/package/@konard/client-handler-example Start Deep instance: https://gitpod.io/#https://github.com/deep-foundation/dev

IMG_2080

IMG_2081

async ({ deep }) => {
  const React = await deep.import('react');
  const { Box } = await deep.import('@chakra-ui/react');

 return ({ fillSize, style, link }) => {

GPT4Code


I have build.ts file:

import * as fs from 'fs';
import pkg from '../deep.json';

Write a tic-tac-toe game using React.js stateless components. Put everything into single html file. Output just the code for index.html.


Here's a simple tic-tac-toe game using React.js stateless components within a single HTML file. Simply copy and paste the following code into an index.html file and open it in a browser to see the game in action.

<!DOCTYPE html>
<html lang="en">
<head>

Top 10 React demo component examples.


Here are the top 10 React demo component examples that you can use as inspiration for your projects:

  1. Todo List: A simple todo list application demonstrates managing state, handling user input, and rendering a list of items based on state. Example: https://codesandbox.io/s/todolist-react-example-vn0xr

  2. Counter:

@Konard
Konard / packages.md
Last active March 21, 2023 02:49
Search for Deep packages on NPM and inside Deep.

image

({ deep, require }) => {
  const React = require('react');
  const axiosHooks = require("axios-hooks");
  const axios = require("axios");
  const useAxios = axiosHooks.makeUseAxios({ axios: axios.create() });
  const makeNpmPackagesUrl = (query) => {

Кто знает способ нормально запушить mathMl выражения в docx файл? например с помощью js или python


Для вставки MathML выражений в docx файл, вы можете использовать Python с библиотекой python-docx. Библиотека python-docx позволяет создавать, редактировать и сохранять файлы Microsoft Word (.docx). Для работы с MathML, вы можете использовать пакет python-docx-omml для преобразования MathML в Office MathML (OMML), который совместим с форматом .docx.

Сначала установите необходимые пакеты:

@Konard
Konard / GPT4Deep.md
Last active March 19, 2023 14:45
A way to ask GPT-4 to use Deep from https://deep.foundation
pm run gitpod-migrate
> @deep-foundation/[email protected] gitpod-migrate /workspace/dev
> export NEXT_PUBLIC_ENGINES=0; export NEXT_PUBLIC_HIDEPATH=1; export npm_config_yes=true; export JWT_SECRET="{\"type\":\"HS256\",\"key\":\"3EK6FD+o0+c7tzBNVfjpMkNDi2yARAAKzQlk8O2IKoxQu4nF7EdAh8s3TwpHwrdWT6R\"}" export MIGRATIONS_ID_TYPE_SQL=bigint; export MIGRATIONS_ID_TYPE_GQL=bigint; export MIGRATIONS_HASURA_PATH=$(echo $(gp url 8080) | awk -F[/:] '{print $4}'); export DEEPLINKS_HASURA_PATH=$(echo $(gp url 8080) | awk -F[/:] '{print $4}'); export MIGRATIONS_HASURA_SSL=1; export DEEPLINKS_HASURA_SSL=1; export MIGRATIONS_HASURA_SECRET=myadminsecretkey; export DEEPLINKS_HASURA_SECRET=myadminsecretkey; export NEXT_PUBLIC_DEEPLINKS_SERVER=https://$(echo $(gp url 3007) | awk -F[/:] '{print $4}'); export NEXT_PUBLIC_GQL_PATH=$(echo $(gp url 3006) | awk -F[/:] '{print $4}')/gql; export NEXT_PUBLIC_GQL_SSL=1 DEEPLINKS_HASURA_PATH=$(echo $(gp url 8080) | awk -F[/:] '{print $4}'); export DEEPLINKS_HASURA_SSL=1; export MIGRATIONS_DEEPL
@Konard
Konard / chatgpt-with-qa-format.js
Created December 15, 2022 12:53 — forked from shinshin86/chatgpt-with-qa-format.js
Script for displaying the conversing with ChatGPT in the console log in QA format.
// USAGE: After conversing with ChatGPT, run this code on the Chrome developer console.
const textList = []
document.querySelectorAll('.text-base').forEach((t, i) => {
textList.push(`${i % 2 === 0 ? "Q:" : "A:"} ${t.textContent}`)
})
console.log(textList.join('\n'));
@Konard
Konard / input.txt
Last active December 14, 2022 13:43
A solution to split bytes into 7 bit chunks by ChatGPT
We split bytes [0b1101_0101, 0b1010_1010] into 7 bit chunks like this [0b0101_0101, 0b0101_0101, 0b0000_0010]
Make a function in rust for any number of bytes.