Skip to content

Instantly share code, notes, and snippets.

Trying my best to be worth something.

Benjamin Lupton balupton

Trying my best to be worth something.
View GitHub Profile
balupton /
Last active Jan 16, 2021
Massively Scalable Web Infrastructure

Massively Scalable Web Infrastructure


These items still need to be categorised below:


Toward better libraries

I am recently re-branding my libraries as µ (micro), refactoring these when necessary, dropping IE < 11 support, improving the logic where possible, or providing a better, more robust, or faster, API.

In few words, on the right there is the modern version of libraries I've used for the last ~5 years in production or for side projects, and I suggest anyone having one of the earlier dependencies, to have a look at their modern, micro, counterpart.

How to read these tables

All sizes are minified, brotli compressed, and representing these two files, when possible:

dvalfrid / gist:72a203931a928dbc67e2da568b4c5547
Last active Nov 5, 2020
Control the POE fan with ubuntu
View gist:72a203931a928dbc67e2da568b4c5547

Rasparry PI - how to control your POE-fan in Ubuntu

Check if you have the POE-fan

cat /sys/class/thermal/cooling_device0/type

should give rpi-poe-fan

Create file

sudo vi /etc/udev/rules.d/50-rpi-fan.rules

View ExampleHook.ts
import { Component, h } from '@stencil/core';
import { useState } from 'haunted';
import { useHook } from './stencil-hooks';
tag: 'example-hook',
export class ExampleHook {
render = useHook(this, () => {
balupton /
Last active Oct 4, 2020
Learnings from living moneyless for a year in 2014-2015

What inspired it?

In 2013 when I was teaching JavaScript in Berlin, I was introduced to the squatter and dumpster diving movements. Then later in 2013 in Sydney, was introduced to foraging.

Recognised that:

  • my conceptions of food was constrained to that of supermarkets.

  • one can have their basic necessities supplied without money, so people should stop demanding money

View twitter-let-it-burn.js
// This is a hack, a quick and dirty console script for RT/tweets (with replies) removal w/o API
// To be used in:
// Set your username (without @) below (case-sensitive) to correctly trigger the right Menu
const tweetUser = 'Username'
// BUG, With above we still trigger Menu on some replies but relatively harmless.
// @Hack Implement simple has() for querySelector
const querySelectorHas = function( parent, child ){
WebReflection /
Last active Jun 12, 2021
A recap of my FE / DOM related libraries

My FE/DOM Libraries

a gist to recap the current status, also available as library picker!

Minimalistic Libraries

do one thing only and do it well

  • µhtml (HTML/SVG auto-keyed and manual keyed render)
  • augmentor (hooks for anything)
  • wickedElements (custom elements without custom elements ... wait, what?)
balupton /
Last active Jul 15, 2020
Understanding Society

Understanding Society

A talk, book, and series of posts to write.

  1. How to Read A Book
  2. Normativeness and Tolerance
    1. Bullying
      1. Political Correctness is bullying at the Telos
        1. Intolerant Tolerance
        2. Insensible Sensitivities
colllin /
Last active May 26, 2021
FaunaDB User Token Expiration (for ABAC)

Auth0 + FaunaDB ABAC integration: How to expire Fauna user secrets.

Fauna doesn't (yet?) provide guaranteed expiration/TTL for ABAC tokens, so we need to implement it ourselves if we care about it.

What's in the box?

3 javascript functions, each of which can be imported into your project or run from the command-line using node path/to/script.js arg1 arg2 ... argN:

  1. deploy-schema.js: a javascript function for creating supporting collections and indexes in your Fauna database.
kitsonk / bronto.ts
Last active Mar 20, 2021
Example Deno Static Server
View bronto.ts
import {
} from "";
import {