Skip to content

Instantly share code, notes, and snippets.

View caesarsol's full-sized avatar
🍋

cesare soldini caesarsol

🍋
View GitHub Profile

The Myers diff algorithm

The following based on Myers' original paper.

The edit graph

To use the example from the paper, say you want to calculate the difference between two strings:

@gcanti
gcanti / TDD.md
Last active October 10, 2016 09:51

Type driven development with Flow

Written by @alpacaaa and @GiulioCanti

"Type driven development" is a technique used to split a problem into a set of smaller problems, letting the type checker suggest the concrete implementation, or at least helping us getting there. Here's a practical example

The Problem

Say for instance that we like to reimplement the function Promise.all, we'll name it sequence. Let's start with its signature

@shawnbot
shawnbot / README.md
Last active October 17, 2017 05:55
Bar charts in Sketch? Yep.

This is a Sketch script to make bar charts.

bars

Here's how to run it:

  1. Make a selection of only shapes with names in the format:
(anything)value={number}
@staltz
staltz / introrx.md
Last active October 3, 2024 12:39
The introduction to Reactive Programming you've been missing
from django.views.generic.base import View, TemplateResponseMixin
from django.views.generic.edit import FormMixin, ProcessFormView
class MultipleFormsMixin(FormMixin):
"""
A mixin that provides a way to show and handle several forms in a
request.
"""
form_classes = {} # set the form classes as a mapping