Skip to content

Instantly share code, notes, and snippets.

View zbeyens's full-sized avatar

Ziad Beyens zbeyens

View GitHub Profile
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.3 (176)
#
# Alignment
# ---------
## Alignment
@zbeyens
zbeyens / nodejs-cheatsheet.js
Last active February 26, 2018 18:03 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@zbeyens
zbeyens / js-cheatsheet.md
Created February 26, 2018 18:12 — forked from alexpchin/js-cheatsheet.md
JS Cheatsheet

JS Cheat Sheet

A selection of JavaScript snippets for your quick perusal when you are dashing between billion-dollar ideas.

Trivial expressions

blah
@zbeyens
zbeyens / vanilla-js-cheatsheet.md
Last active February 27, 2018 02:40 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
@zbeyens
zbeyens / bd3d4befe38185704bf0fc875e9deed6|configuration.json
Last active January 31, 2019 21:42
Visual Studio Code Settings Sync Gist
{"contents":{"eslint":{"enable":true},"launch":{"version":"0.2.0","configurations":[{"type":"node","request":"launch","name":"Launch Program","program":"${file}"}]}},"overrides":[],"keys":["eslint.enable","launch.version","launch.configurations"]}
@zbeyens
zbeyens / settings.json
Last active October 10, 2019 09:42
color info
"colorInfo.languages":[
{
"selector": "css",
"colors": "css"
},
{
"selector": "sass",
"colors": "css"
},
{
@zbeyens
zbeyens / normalized leaf.tsx
Last active August 29, 2022 11:21
normalized leaf
export const MARK_THREAD = 'thread'
export const getThreadKey = (id: string) => MARK_THREAD + '_' + id
export const isThreadKey = (key: string) => key.startsWith(MARK_THREAD + '_')
export const createThreadPlugin = createPluginFactory({
key: MARK_THREAD,
isLeaf: true,
const RemoteSelection = ({ data, selectionRects, caretPosition }: CursorOverlayData<CursorData>) => {
if (!data) {
return null
}
return (
<>
{selectionRects.map((position, i) => (
<div
key={i}
import {
getPluginType,
type PlatePlugin,
type TDescendant,
type TElement,
type TText,
} from '@udecode/plate-common';
import {
remarkTransformElementChildren,
type DeserializeMdPlugin,