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
| [user] | |
| name = Gerard Rovira | |
| email = gerard.rovira.sanchez@gmail.com | |
| [gpg] | |
| program = gpg2 | |
| [alias] | |
| tree = log --oneline --graph --color --all --decorate | |
| sbranch = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format='%(refname:short)' | |
| pr = "!f() { if [ $# -lt 1 ]; then echo \"Usage: git pr <id> [<remote>] # assuming <remote>[=origin] is on GitHub\"; else git checkout -q \"$(git rev-parse --verify HEAD)\" && git fetch -fv \"${2:-origin}\" pull/\"$1\"/head:pr/\"$1\" && git checkout pr/\"$1\"; fi; }; f" | |
| ac = "!f() { git add . && git commit -m \"$*\"; }; f" |
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 validInputTypes = new Set([ | |
| "insertText", | |
| "insertCompositionText", | |
| "insertFromComposition", | |
| "insertLineBreak", | |
| "insertParagraph", | |
| "deleteCompositionText", | |
| "deleteContentBackward", | |
| "deleteByComposition", | |
| "deleteContent", |
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
| // ==UserScript== | |
| // @name Google Play Books Minimalistic | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1 | |
| // @description | |
| // @author zurfyx | |
| // @homepageURL https://gist.github.com/zurfyx/bc39aa7119d1ebbc469daee7c04fd0fd | |
| // @match https://books.googleusercontent.com/books/reader/frame* | |
| // @grant none | |
| // ==/UserScript== |
The EditorState is always synced with other parties via Collab, and part of the clipboard logic.
There's times when the result should be kept strictly offline. For example:
- Search or multi text search (i.e. VSCode find all). Or to show GenAI GPT results.
- Other player cursors in Collab (not part of th EditorState)
- GenAI GPT Office/Notion-like popover on edit when the prompt refers to a specific part of the edit but the focus has moved to the modal.
This solution leverages Range to follow DOM updates and render on top of the Lexical editor completely independently from the editor. The MutationObserver introduced below is particularly important to make sure that the position is always up-to-date. For example, additional changes in the padding or additional added/removed nodes somewhere on the contenteditable or immediately before our selection host.
The editor dependency is very lightweight, it could easily be decoupled completely.
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
| type LexicalNodeType2<Type> = $ReadOnly<{ | |
| type: Type, | |
| ... | |
| }>; | |
| export type SerializedXNode = $ReadOnly<{ | |
| // children: Array<SerializedNode>, | |
| direction: 'ltr' | 'rtl' | null, | |
| format: number, | |
| indent: number, |
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
| pragma solidity ^0.4.24; | |
| import "./Ownable.sol"; | |
| /** | |
| * @title Contract to register reuse requests on the InVID Rights Management site. | |
| * @dev This contract stores the various request requests and their parties, as well as each of the | |
| * reuse request steps that were taken during the negotiation process. | |
| * The reuse request terms for each of the steps can be found on IPFS. | |
| */ |
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 React, { Fragment, useState } from 'react'; | |
| /** | |
| * Plug in many providers with a single component. | |
| * Use: | |
| * const Providers = provideBundle(ThemeProvider, LanguageProvider); | |
| * <Providers> | |
| * <YourComponent></YourComponent> | |
| * </Providers> | |
| */ |
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
| #!/bin/bash | |
| # https://stackoverflow.com/a/19618159 | |
| # https://stackoverflow.com/a/51861820 | |
| # | |
| # Example file contents: | |
| # touch /tmp/a.txt | |
| # touch /tmp/b.txt | |
| if [ "$#" -eq 0 ]; then | |
| echo "$0 <file> [max-procs=0]" |
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
| /node_modules |
NewerOlder
