This file contains 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
struct Item; | |
struct Foo { recv_wakers: VecDeque<GuardedWaker> } | |
impl Foo { | |
fn wake_recv(&mut self) { | |
while let Some(waker) = self.recv_wakers.pop_front() { | |
if waker.wake_if_alive() { | |
break; | |
} | |
} | |
} |
This file contains 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
round 0: bind 3ms | addr 370ms | conn 194ms | |
round 1: bind 8ms | addr 348ms | conn 8ms | |
round 2: bind 5ms | addr 342ms | conn 8ms | |
round 3: bind 7ms | addr 360ms | conn 5ms | |
round 4: bind 4ms | addr 349ms | conn 8ms | |
round 5: bind 15ms | addr 356ms | conn 3ms | |
round 6: bind 5ms | addr 365ms | conn 8ms | |
round 7: bind 13ms | addr 340ms | conn 8ms | |
round 8: bind 11ms | addr 346ms | conn 8ms | |
round 9: bind 6ms | addr 336ms | conn 201ms |
This file contains 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. |
This file contains 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 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 = |
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 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 | |
}, |
This file contains 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 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: |
NewerOlder