Source for https://www.val.town/v/saolsen/example_rust_http_val For build instructions see https://gist.github.com/saolsen/d273bb1baba5e912e4dc2b187511affa For usage see https://www.val.town/v/saolsen/use_example_rust_http_val
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
// wow, this is awesome | |
// you really don't need drizzle, this is much better | |
// I really kinda hate that copilot isn't working though... | |
import postgres from "npm:postgres"; | |
import PgBoss from "npm:pg-boss"; | |
interface World { | |
world: string; |
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
ARG DENO_VERSION=1.42.2 | |
ARG BIN_IMAGE=denoland/deno:bin-${DENO_VERSION} | |
FROM ${BIN_IMAGE} AS bin | |
FROM frolvlad/alpine-glibc:alpine-3.13 | |
RUN apk --no-cache add ca-certificates | |
RUN addgroup --gid 1000 deno \ | |
&& adduser --uid 1000 --disabled-password deno --ingroup deno \ |
Make a Val with rust.
Build a https://www.val.town/ val with rust. This is an example of how to compile a rust file to wasm and use it as a val.
Requires rust, wasm-pack and deno.
- Put your code in
val.rs
. - Build it.
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
from itertools import batched | |
def ordered(a, b) -> bool | None: | |
match a, b: | |
case int(i), int(j): | |
if i == j: | |
return None | |
return i < j | |
case list(i), list(j): |
C-b :
capture-pane -S -
C-b :
save-buffer filename.txt
https://unix.stackexchange.com/questions/26548/write-all-tmux-scrollback-to-a-file
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
target |
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 rayon::prelude::*; | |
use thiserror::Error; | |
const ROWS: usize = 6; | |
const COLS: usize = 7; | |
#[derive(Debug)] | |
pub struct Connect4Action { | |
pub column: usize, | |
} |
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
FROM debian:stable-slim as get | |
WORKDIR /bun | |
RUN apt-get update | |
RUN apt-get install curl unzip -y | |
RUN curl --fail --location --progress-bar --output "/bun/bun.zip" "https://github.com/oven-sh/bun/releases/latest/download/bun-linux-x64.zip" | |
RUN unzip -d /bun -q -o "/bun/bun.zip" | |
RUN mv /bun/bun-linux-x64/bun /usr/local/bin/bun | |
RUN chmod 777 /usr/local/bin/bun |
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
ProcessGDBRemote::StartAsyncThread () | |
< 1> send packet: + | |
ProcessGDBRemote::AsyncThread (arg = 0x1498a7018, pid = 0) thread starting... | |
ProcessGDBRemote::AsyncThread (arg = 0x1498a7018, pid = 0) listener.WaitForEvent (NULL, event_sp)... | |
history[1] tid=0x0103 < 1> send packet: + | |
< 19> send packet: $QStartNoAckMode#b0 | |
< 1> read packet: + | |
< 6> read packet: $OK#9a | |
< 1> send packet: + | |
< 86> send packet: $qSupported:xmlRegisters=i386,arm,mips,arc;multiprocess+;fork-events+;vfork-events+#2e |
NewerOlder