Listening on 127.0.0.1:8000
new connection from 127.0.0.1:52456
start handshaking
initiator: false
keypair public [160, 40, 198, 116, 22, 83, 78, 176, 233, 211, 154, 123, 37, 225, 135, 217, 143, 57, 220, 36, 141, 64, 202, 205, 154, 40, 249, 126, 1, 171, 64, 65] private [70, 92, 38, 45, 171, 60, 30, 169, 236, 96, 53, 30, 116, 242, 201, 22, 175, 223, 80, 0, 165, 119, 101, 25, 94, 101, 160, 229, 78, 174, 14, 64]
local pubkey: [a0, 28, c6, 74, 16, 53, 4e, b0, e9, d3, 9a, 7b, 25, e1, 87, d9, 8f, 39, dc, 24, 8d, 40, ca, cd, 9a, 28, f9, 7e, 1, ab, 40, 41]
local nonce: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in one terminal: | |
node hypercore-demo.js server 8080 | |
# in another | |
git clone https://github.com/Frando/hypercore-protocol-rust-experiments | |
cargo run --example basic -- client 8080 | |
# this will print: | |
recv: Open(Open { discovery_key: [184, 247, 61, 143, 233, 194, 150, 241, 106, 107, 132, 78, 106, 85, 102, 241, 250, 223, 3, 228, 39, 56, 171, 83, 111, 70, 25, 193, 212, 113, 39, 143], capability: None }) | |
send 1 Open(Open { discovery_key: [184, 247, 61, 143, 233, 194, 150, 241, 106, 107, 132, 78, 106, 85, 102, 241, 250, 223, 3, 228, 39, 56, 171, 83, 111, 70, 25, 193, 212, 113, 39, 143], capability: None }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto2"; | |
package hrpc; | |
import "google/protobuf/descriptor.proto"; | |
extend google.protobuf.ServiceOptions { | |
optional uint32 service = 50000; | |
} | |
extend google.protobuf.MethodOptions { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
backend: | |
image: "arsoxyz/oas:nightly" | |
ports: | |
- "8080:8080" | |
volumes: | |
- "./data/oas:/data" | |
environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use tuix::*; | |
fn main() { | |
let props = WindowDescription::new().with_title("Sample app"); | |
let app = Application::new(props, |state, root| { | |
App::default().build(state, root, |b| b); | |
}); | |
app.run(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { makeWrapResolversPlugin } from 'graphile-utils' | |
import type { GraphQLField } from 'graphql' | |
const PaginationDefault = makeWrapResolversPlugin( | |
({ scope }) => { | |
if (scope.isPgFieldConnection) { | |
return { scope } | |
} | |
return null | |
}, |
Assuming you have a self-hosted Outline Wiki and Keycloak setup running, do the following:
- Add the
webhooks
service to yourdocker-compose.yml
- Save the
server.ts
towebhooks/server.ts
(relative to your compose file) - Save
webhooks.env
into the same folder as your compose file - Via your webserver configuration add a subdomain, eg
webhooks.wiki.yoursite.org
to forward to your webhook service port 8000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// deployed via deno deploy (free plan) and call with | |
// https://posh-eel-46.deno.dev/?q=https://url.to/some-media.mp3 | |
const image = "ghcr.io/ggerganov/whisper.cpp:main"; | |
const model = "tiny"; // see https://github.com/ggerganov/whisper.cpp/blob/master/models/download-ggml-model.sh#L28 | |
const maxDuration = 1000 * 10; // 10s | |
function build(url: string) { | |
const prepare = "mkdir /models"; | |
const fetchModel = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use anyhow::Result; | |
use futures_lite::stream::StreamExt; | |
use iroh::{ | |
base::node_addr::AddrInfoOptions, | |
client::docs::{LiveEvent, ShareMode}, | |
docs::{store::Query, DocTicket}, | |
node::MemNode, | |
}; | |
#[tokio::main] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Exploration how we will expose willow in iroh. | |
// No client API exists atm in the willow branch. This is a design sketch. | |
// Willow adds more complexity especially around capabilities. | |
// I will first write a "full power" version, and then try to simplify it for common use cases. | |
let node = Node::memory().spawn().await?; | |
// We create an author. This could stay roughly the same as currently. | |
// Note that in iroh-willow, what we call an author is called a user. |