Skip to content

Instantly share code, notes, and snippets.

View mattwelke's full-sized avatar

Matt Welke mattwelke

View GitHub Profile
@peerreynders
peerreynders / reactIsAFramework.md
Last active May 6, 2024 08:44
React is a (view component) framework

"Art prior" to React:

Martin Fowler: InversionOfControl (2005-Jun-26)

Inversion of Control is a key part of what makes a framework different to a library. A library is essentially a set of functions that you can call, these days usually organized into classes. Each call does some work and returns control to the client.

A framework embodies some abstract design, with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework's code then calls your code at these points.

The litmus test:

  • If your code calls it, it's a library.
@0ex-d
0ex-d / Base64.js
Created May 9, 2020 14:28
Hard-coded support for Base64 in NodeJs
// @flow
// Inspired by: https://github.com/davidchambers/Base64.js/blob/master/base64.js
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
const Base64 = {
btoa: (input:string = '') => {
let str = input;
let output = '';
for (let block = 0, charCode, i = 0, map = chars;
@alexellis
alexellis / GUIDE.md
Last active July 31, 2023 10:51
Equinix Metal is my computer

From my blog post: The Internet is my computer

Equinix Metal is my computer

Run hosted VSCode on Equinix Metal's huge: AMD Epyc instances with 64GB RAM and 24 Cores, coupled with a bonded 2 x 10 Gbps uplink to the Internet.

Hosted VSCode

  • Provision your Ubuntu 20.04 LTS server using the dashboard and add your SSH key
  • Once you have the public IP, log in over SSH