Skip to content

Instantly share code, notes, and snippets.

import { EditorState, Modifier, Entity, SelectionState } from 'draft-js'
import linkifyIt from 'linkify-it'
import tlds from 'tlds'
const linkify = linkifyIt()
linkify.tlds(tlds)
const linkifyEditorState = (editorState) => {
const contentState = editorState.getCurrentContent()
@danii1
danii1 / gist:ca07a9c42848e1df58a3
Created November 19, 2015 21:17
Git as a presentation tool
# tag target commits as demo-start, demo-end
# move to the start of your presentration with `git checkout demo-start`
# use to `git next`, `git prev` to jump between "slides"
git config --global alias.next '!git checkout `git rev-list HEAD..demo-end | tail -1`'
git config --global alias.prev 'checkout HEAD^'
@danii1
danii1 / gist:07dc9bef2179722edad2
Created November 9, 2015 18:04
View extracted article from url in terminal
function wv
curl -s $argv | unfluff | jq -r '.title, .text' | xargs -0 echo '#' | nd
end