Skip to content

Instantly share code, notes, and snippets.

View RangerMauve's full-sized avatar
💜
Decentralizing

Mauve Signweaver RangerMauve

💜
Decentralizing
View GitHub Profile
@pfrazee
pfrazee / 0.8-new-apis.md
Last active May 4, 2018 17:56
Reference for new APIs in Beaker 0.8

New APIs in Beaker 0.8

This Gist is a quick writeup for devs using the beta or master build. We'll get a more complete writeup in the Beaker site docs on 0.8's final release. Feel free to open issues for discussion.

DatArchive

We've done some work on the DatArchive API to make it easier to use. Prior to 0.8, Dats had a "staging area" folder which you had to commit() to publish. In 0.8, Beaker will automatically sync that folder. As a result, the staging-area methods (diff() commit() and revert()) were deprecated. There are also some new methods, and a few changes to how events work.

Here's a full reference:

@cjihrig
cjihrig / wasi.c
Last active March 21, 2020 14:14
WASI C Header
#include "uvwasi.h"
__wasi_errno_t __wasi_args_get(char** argv, char* argv_buf) {
return __WASI_ENOTSUP;
}
__wasi_errno_t __wasi_args_sizes_get(size_t* argc, size_t* argv_buf_size) {
return __WASI_ENOTSUP;

Hyperswarm DHT setup

Checking your network for P2Pness

Running a node

Running a dht node is as simple as installing the DHT cli.

npm i -g @hyperswarm/cli
@qwtel
qwtel / whatwg-stream-to-async-iterable.ts
Created October 12, 2020 09:02
Convert WHATWG web streams to async iterables and back
export async function* streamToAsyncIterable<T>(stream: ReadableStream<T>): AsyncIterableIterator<T> {
const reader = stream.getReader();
try {
while (true) {
const { done, value } = await reader.read();
if (done) return;
yield value;
}
} finally { reader.releaseLock() }
}
@i-infra
i-infra / appropriate_phone_infra.md
Last active December 2, 2021 22:27
How to get a (GVoice) phone number that you can use, safely, to interact with strangers, online. [2021]

Appropriate Phone Infra (Operational GVoice) v0.9.0

Public Release Feb17, 2021.

Copyright 2021, AKA Infra

Released under Creative Commons by Attribution 4.0 International (CC BY 4.0)

You are free to:

  • Share — copy and redistribute the material in any medium or format
@theodric
theodric / steam-deck-arch-chroot.txt
Last active December 26, 2023 13:16
Setting up an Arch chroot environment on the Steam Deck, then using as NOT a chroot environment
## So you want to use stuff like 'tmux' and 'lolcat' on the Steam Deck, but they haven't been included in the base OS?
# One way to do it is this.
# 1. setup a chroot environment so there is a file structure in which Pacman can download/unpack packages and their dependencies.
# 2. don't use it as a chroot environment; rather, add the various /bin directories inside it to your $PATH, and create an /etc/ld.so.conf.d/deck-local-arch.conf to permit the bins to find the libs they need.
mkdir -p ~/.local/packer
cd ~/.local
#these steps are required, or else the pacstrap will fail with 'marginal trust' errors
pacman -Sy archlinux-keyring
pacman-key --populate archlinux