Skip to content

Instantly share code, notes, and snippets.

View cablehead's full-sized avatar

Andy Gayton cablehead

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/icon.ico" type="image/x-icon">
{% if tld == "stacks" %}
@cablehead
cablehead / stream.out
Created February 29, 2024 20:37
stream-with-trace.out
2024-02-29 08:33:48.441 PM [TRACE] nu_cli::repl: [crates/nu-cli/src/repl.rs:776] eval source: http get https://ndyg.cross.stream/projects/chat-app/messages | from sse
2024-02-29 08:33:48.442 PM [TRACE] nu_parser::parser: [crates/nu-parser/src/parser.rs:5752] parsing block: LiteBlock { block: [LitePipeline { commands: [Command(None, LiteCommand { comments: [], parts: [Span { start: 125515, end: 125519 }, Span { start: 125520, end: 125523 }, Span { start: 125524, end: 125576 }] }), Command(Some(Span { start: 125578, end: 125579 }), LiteCommand { comments: [], parts: [Span { start: 125580, end: 125584 }, Span { start: 125585, end: 125588 }] })] }] }
2024-02-29 08:33:48.442 PM [TRACE] nu_parser::parser: [crates/nu-parser/src/parser.rs:5586] parsing: pipeline element: command
2024-02-29 08:33:48.442 PM [TRACE] nu_parser::parser: [crates/nu-parser/src/parser.rs:5065] parsing: expression
2024-02-29 08:33:48.442 PM [TRACE] nu_parser::parser: [crates/nu-parser/src/parser.rs:2303] parsing: filesize
2024-02-29 08:33:48
```
iter
and go
write: false
iter
write: Ok
want lock
have lock
process_value: []
iter
```
~/.s/sessions/03B982FI3LF406403X7R7HD9Z/nushell: http get https://ndyg.cross.stream/projects/chat-app/messages | from sse 02/29/2024 03:27:45 PM PM
want lock
have lock
ready to write
iter
and go
write: false
write: Ok
iter
@cablehead
cablehead / Cargo.toml
Last active November 19, 2023 03:06
example for UnexpectedEof error on successful HTTP/2 TLS requests with Hyper v1.0.1
[package]
name = "hv1-tls-eof"
version = "0.1.0"
edition = "2021"
[dependencies]
hyper = { version = "1.0.1", features = ["full"] }
tokio = { version = "1", features = ["full"] }
http-body-util = "0.1"
hyper-util = { version = "0.1.1", features = ["full"] }
@cablehead
cablehead / version.json
Last active May 26, 2023 20:09
Tauri updater
{
"version": "v0.3.3",
"notes": "Test version",
"pub_date": "2023-05-26T15:26:38-04:00",
"platforms": {
"darwin-aarch64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVTTm5wRE5ISjZKcEFsWFluWEZVcEs3eVNUUGdWanNqTnBqNzB2SENXaGppaXdZVms3enhlVExtbythTTNHVGg2TVIzQ2ZNTjFWME9wWTJGNERQUkxOMVRIVXAyc2pVYkFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNjg1MTI4OTgyCWZpbGU6U3RhY2tzLmFwcC50YXIuZ3oKUXVoK2wrZ052WjFYTzFoM2UxWHhCNnhaKzJnQ1lRODJ2YXVodk9QbzAyRnZ5VCt2eDNvdTFoNHdsbDZmS1RIUldIZEliZk9WWGhYZDd1UUl5WFVYQVE9PQo=",
"url": "https://github.com/cablehead/stacks/releases/download/v0.3.4/Stacks_0.3.4_aarch64.app.tar.gz"
}
}
@cablehead
cablehead / 01-pull-open-graph.sh
Last active April 5, 2022 12:32
shell snippet to query a webpage and extract it's opengraph meta data as json
curl -s https://ogp.me | pup 'head meta json{}' | \
jq '.[] | select(.property) | select(.property | contains("og:")) | {(.property) : (.content)}' | \
jq -s add
Enter function to be integrated for f(x): x**2
Enter lower limit / bound of integration: 1
<class 'str'>
<class 'int'>
You entered: 1
Enter upper limit / bound of integration: 3
You entered: 3
Enter number of segments of integration: 20
You entered: 20
Result: 8.66666666666667