A selection of JavaScript snippets for your quick perusal when you are dashing between billion-dollar ideas.
blah
# | |
# Uncrustify Configuration File | |
# File Created With UncrustifyX 0.3 (176) | |
# | |
# Alignment | |
# --------- | |
## Alignment |
/* ******************************************************************************************* | |
* THE UPDATED VERSION IS AVAILABLE AT | |
* https://github.com/LeCoupa/awesome-cheatsheets | |
* ******************************************************************************************* */ | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html | |
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |
Table of Contents generated with DocToc
{"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"]} |
"colorInfo.languages":[ | |
{ | |
"selector": "css", | |
"colors": "css" | |
}, | |
{ | |
"selector": "sass", | |
"colors": "css" | |
}, | |
{ |
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, |