Skip to content

Instantly share code, notes, and snippets.

View StevenLangbroek's full-sized avatar

Steven Langbroek StevenLangbroek

View GitHub Profile
#!/usr/bin/env bash
# This bash script synchronises dotfiles by exporting each file specified
# in the `dotfiles` array from the `$FROM` directory path to the `$TO`
# directory path.
# If a specified file cannot be found, `cp` will log a path error and
# continue onto the next file.
#
# NOTE
# You can make this script executable by setting the following:
@jevakallio
jevakallio / reactiveconf-slam-poetry.md
Last active July 7, 2021 19:57
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

@nikgraf
nikgraf / reactive-2016.md
Last active August 5, 2021 15:31
Proposal for lightning talk at Reactive Conf 2016

Rich text editing with DraftJS Plugins

Earlier this year Facebook open sourced its React based rich text editing framework Draft.js. At Facebook it powers status updates, comments & notes. Others used it to build editors matching Medium’s experience.

Together with a whole team of open source contributors I built a plugin architecture on top of Draft.js. In this talk I walk you through the existing plugins and show how you can build your own feature-rich text editor for the web with only a handful lines of code. 🤓

Draft JS Plugins Logo

var {authDiscardToken} = require('./actions');
var request = require('superagent');
var API_ROOT = 'http://localhost/api';
/*
This below is the format the middleware accepts.
{
types: [ACT_LOGIN_PENDING, ACT_LOGIN_SUCCESS, ACT_LOGIN_ERROR],
url: '/auth/login',

Publishing an NPM package

Here's what I do when I publish an NPM package.

1: Make sure you're up to date

I always like to check what's going on in a repo before I do anything: