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
import "./styles.css"; | |
import { parseGIF, decompressFrames } from "gifuct-js"; | |
import WebMWriter from "webm-writer"; | |
export default function App() { | |
const handleChange = (e) => { | |
const file = e.target.files[0]; | |
const filereader = new FileReader(); | |
filereader.onload = (res) => { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import React from 'react'; | |
import type { ExternalToast, ToastT, PromiseData, PromiseT, ToastToDismiss, ToastTypes } from './types'; | |
let toastsCounter = 1; | |
class Observer { | |
subscribers: Array<(toast: ExternalToast | ToastToDismiss) => void>; | |
toasts: Array<ToastT | ToastToDismiss>; | |
constructor() { |
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
import React, { useEffect, useState, useRef, useMemo, useCallback } from 'react'; | |
import { Text, Editor, createEditor, Node, Range, Point, Transforms } from 'slate'; | |
import { | |
Slate, | |
Editable, | |
withReact, | |
useSelected, | |
useFocused, | |
useSlate } from 'slate-react'; | |
import { withHistory } from 'slate-history'; |
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
import { useEffect, useRef } from "react"; | |
export default function App() { | |
// create a ref | |
const divElement = useRef(); | |
// trigger on the first render of the component | |
useEffect(() => { | |
// get the height of the div element | |
console.log( |
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
// add this class to the div | |
.centerAnElement { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} |
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 observable(v){ | |
this.value = v; | |
this.valueChangedCallback = null; | |
this.setValue = function(v){ | |
if(this.value != v){ | |
this.value = v; | |
this.raiseChangedEvent(v); | |
} |
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
import React, {useState, useEffect} from 'react'; | |
import useLocalStorage from 'use-local-storage'; | |
const AdressBook = () => { | |
const [book , setBook] = useLocalStorage('addressbook', [{}]) | |
const [name, setName] = useState('') | |
const [address, setAddres] = useState('') |
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 itemQuery = selectorFamily({ | |
key: 'ItemQuery', | |
get: cursor => () => ApiCall(cursor), | |
}); | |
const currentCursorInternal = atom<number>({ | |
key: 'currentCursorInternal', | |
default: 0, | |
}); |
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 { Client } = require("@notionhq/client"); | |
const axios = require('axios') | |
const notion2md = require("notion-to-md"); | |
const databaseId = 'YOUR_DATABASE_ID'; | |
const notion = new Client({ | |
auth: "YOUR_NOTION_TOKEN", |
NewerOlder