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
exampleSketch = | |
startSketchOn("-XZ") | |
- |> circle({ center = [0, 0], radius = 10 }, %) | |
+ |> circle(center = [0, 0], radius = 10) |
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
// base radius | |
const r = 50 | |
// layer height | |
const h = 10 | |
// taper factor [0 - 1) | |
const t = 0.005 | |
fn layer = (i) => { |
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
Config options different from defaults: | |
background_image /Users/adamchalmers/Downloads/night_desert.png | |
background_image_layout scaled | |
background_opacity 0.6 | |
background_tint 0.6 | |
draw_minimal_borders False | |
enabled_layouts ['tall', 'fat', 'grid', 'horizontal', 'splits', 'stack', 'vertical'] | |
font_family FiraCode Nerd Font Mono | |
font_size 14.0 | |
macos_option_as_alt 3 |
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
Running `CARGO=/home/adam/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=engine-api CARGO_CRATE_NAME=engine_api CARGO_MANIFEST_DIR=/home/adam/kc-repos/engine CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=engine-api CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.2.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/home/adam/kc-repos/engine/target/debug/deps:/home/adam/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/home/adam/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' OUT_DIR=/home/adam/kc-repos/engine/target/debug/build/engine-api-c932a6fb5544a461/out PROMETHEUS_URL='http://prometheus.hawk-dinosaur.ts.net/' VERGEN_GIT_BRANCH=achalmers/set-constraint-actor VERGEN_GIT_SHA=122484f9 /home/adam/.rustup/toolchains/stable-x86_64-unknown- |
This file has been truncated, but you can view the full file.
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
// WARNING: This output format is intended for human consumers only | |
// and is subject to change without notice. Knock yourself out. | |
const _: () = { | |
let mut _0: (); | |
bb0: { | |
_0 = const (); | |
return; | |
} | |
} |
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
From bea85b28a25dcc23711a681d8620e3d3e371eb36 Mon Sep 17 00:00:00 2001 | |
From: Adam Chalmers <[email protected]> | |
Date: Tue, 25 Apr 2023 12:17:43 -0500 | |
Subject: [PATCH] no macro | |
--- | |
src/obj.rs | 52 +++++++++++++++++++++++++--------------------------- | |
1 file changed, 25 insertions(+), 27 deletions(-) | |
diff --git a/src/obj.rs b/src/obj.rs |
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 axum::{ | |
body::Bytes, | |
extract::{self, multipart::MultipartError}, | |
Extension, | |
}; | |
use futures::Stream; | |
use reqwest::StatusCode; | |
async fn upload( | |
mp: extract::Multipart, |
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
// async_zip = { git = "https://github.com/majored/rs-async-zip.git", branch = "main" } | |
// quick-xml = { git = "https://github.com/itsgreggreg/quick-xml.git", branch = "async", features = ["asynchronous"]} | |
use async_zip::read::seek::ZipFileReader; | |
use quick_xml::{events::Event, AsyncReader}; | |
use tokio::io::BufReader; | |
use tokio::sync::mpsc; | |
#[tokio::main] | |
async fn main() -> anyhow::Result<()> { |
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 array_init::array_init; | |
fn permutations<T: Copy, const N: usize>(items: &[T; N]) -> Vec<[T; N]> { | |
permute_naturals::<N>(1, vec![[0; N]]) | |
.into_iter() | |
.map(|perm| array_init(|i| items[perm[i]])) | |
.collect() | |
} | |
/// Generate all `n!` permutations of the natural numbers 0..n |
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 std::ffi::OsStr; | |
use std::io; | |
use std::fs::{self}; | |
use std::path::{Path, PathBuf}; | |
// Find all files in the given directory with the given extension | |
fn paths_matching(extension: &str, dir: &Path) -> io::Result<Vec<PathBuf>> { | |
let mut paths: Vec<PathBuf> = Vec::new(); | |
for entry in fs::read_dir(dir)? { | |
let entry = entry?; |
NewerOlder