Skip to content

Instantly share code, notes, and snippets.

View balupton's full-sized avatar
🏍️
Travelling for next 2 weeks

Benjamin Lupton balupton

🏍️
Travelling for next 2 weeks
View GitHub Profile
@balupton
balupton / readme.md
Last active January 5, 2024 01:12
Debugging Ubuntu VPN/Bridge Networking

Networking on my Ubuntu machines is being flaking:

  • docker bridge interface failing
  • traffic not going to vpns
  • when vpn or docker bridge does work it knocks out all dns resolutions

Here are all the things I have tried or yet to try.

docker failures

import * as coda from "@codahq/packs-sdk";
export const pack = coda.newPack();
pack.setUserAuthentication({
type: coda.AuthenticationType.OAuth2,
authorizationUrl: "https://id.twitch.tv/oauth2/authorize",
tokenUrl: "https://id.twitch.tv/oauth2/token",
scopes: ["user:read:email", "channel:manage:schedule", "user:read:follows"],
additionalParams: { response_type: "code" },
scopeDelimiter: " ",
@ynott
ynott / multipass-on-bridged-network.md
Last active April 14, 2024 17:59
Instructions for running multipass on a bridge network

1. Environmental information

  • OS: Ubuntu 20.04.2 LTS (GNU/Linux 5.8.0-59-generic x86_64)
  • Network: 192.168.xxx.0/24
  • Ubuntu multipass host machine IP: 192.168.xxx.yyy(static IP)
  • NIC: enp2s0(bridge host NIC)
  • Bridge NIC:br0

2. Prerequisites

@balupton
balupton / scale.md
Last active January 16, 2021 00:03
Massively Scalable Web Infrastructure

Massively Scalable Web Infrastructure

Todo

These items still need to be categorised below:

@WebReflection
WebReflection / my-libraries-in-bytes.md
Last active September 24, 2021 22:03
My libraries in bytes

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
dvalfrid / gist:72a203931a928dbc67e2da568b4c5547
Last active November 5, 2020 17:00
Control the POE fan with ubuntu

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

@loganvolkers
loganvolkers / ExampleHook.ts
Last active October 19, 2020 22:47
Stencil Hooks
import { Component, h } from '@stencil/core';
import { useState } from 'haunted';
import { useHook } from './stencil-hooks';
@Component({
tag: 'example-hook',
})
export class ExampleHook {
render = useHook(this, () => {
@balupton
balupton / README.md
Last active October 4, 2020 11:45
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

// This is a hack, a quick and dirty console script for RT/tweets (with replies) removal w/o API
// To be used in: https://twitter.com/Username/with_replies
// 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
WebReflection / dom-libraries.md
Last active February 6, 2024 15:50
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?)