Skip to content

Instantly share code, notes, and snippets.

@kristoferjoseph
kristoferjoseph / .vimrc
Last active November 14, 2017 19:44
minimal vimrc file
set nocompatible " be iMproved, required
set background=dark
syntax enable
filetype on " without this vim emits a zero exit status, later, because of :ft off
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'

Virtual DOM and diffing algorithm

There was a [great article][1] about how react implements it's virtual DOM. There are some really interesting ideas in there but they are deeply buried in the implementation of the React framework.

However, it's possible to implement just the virtual DOM and diff algorithm on it's own as a set of independent modules.

@inhies
inhies / socialnode.go
Last active December 8, 2019 19:23
Reads the public feed from socialno.de every 60 seconds and displays the new posts with proper formatting to fit your terminal width. Usage: `go run socialnode.go`
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"sort"
"strings"
"syscall"