Skip to content

Instantly share code, notes, and snippets.

View bassmanitram's full-sized avatar

Martin Bartlett bassmanitram

  • DXC
  • Paris, France
View GitHub Profile
@bassmanitram
bassmanitram / cargo.toml
Last active December 8, 2023 15:04
Infantile comparison between http::HeaderMap and stde::collections::HashMap
[package]
name = "test-map"
version = "0.1.0"
edition = "2021"
[features]
headermap = []
[dependencies]
ahash = "0.8.6"
@bassmanitram
bassmanitram / Cargo.toml
Created January 24, 2024 15:06
Lambda HTTP Request Deserialization by Serde Json and SIMD JSON
[package]
name = "test-serde-simd-json"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bytes = "1.5"
simd-json = "0.13"
@bassmanitram
bassmanitram / HOWTO.md
Created September 17, 2024 09:56
cross-rs and git - how to make a local ~/.gitconfig and ~/.git-credentials available to a cross-rs container for cross compiling

Move the files to ~/.config/git

mkdir -p ~/.config/git
mv ~/.gitconfig ~/.config/git/config
mv ~/.git-credentials ~/.config/git/credentials
ln -s ~/.config/git/config ~/.gitconfig
ln -s ~/.config/git/credentials ~/.git-credentials

That keeps your current config in place and working while placing your files in a logical place for access (in fact, if you set

@bassmanitram
bassmanitram / each-line.sh
Created March 28, 2025 10:33
How to process each line of a BASH pipe without having to continuously recreate the "while read loop" for commands that can't!
# EXAMPLES
#
# docker ps -q | each-line.sh docker rm @L
# docker images -q | each-line.sh docker rmi @L
#
while IFS= read -r line; do
$(echo "$@" | sed "s/@L/$line/")
done