Skip to content

Instantly share code, notes, and snippets.

View balupton's full-sized avatar
🧙‍♀️
Working on Dorothy, a dotfile ecosystem

Benjamin Lupton balupton

🧙‍♀️
Working on Dorothy, a dotfile ecosystem
View GitHub Profile
@Kaptensanders
Kaptensanders / vs
Last active July 23, 2024 03:33
Open VSCode .code-workspace file from within devcontainer - from terminal
#!/usr/bin/env bash
if [ "$1" == "--help" ]; then
cat << EOF
Run from project folder, auto opens vscode in some mode depending on folder contents:
* Folder contains .devcontainer/devcontainer.json and <name>.code-workspace file: vscode opens in devcontainer, workspace file is loaded
* Folder contains .devcontainer/devcontainer.json: vscode opens in devcontainer
* Folder contains <name>.code-workspace file: Workspace is opened in vscode
@balupton
balupton / readme.md
Last active July 5, 2024 11:07
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 November 5, 2024 13:37
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, () => {
@revgum
revgum / Dockerfile
Created July 8, 2020 15:04 — forked from kesor/Dockerfile
Compile DENO on Alpine (w/MUSL C)
FROM rust:alpine
RUN apk add --no-cache \
bash \
binutils-gold \
ca-certificates \
clang \
curl \
g++ \
git \
@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