Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

35 total results found

Frameworks

Rust

A collection of tutorials for some frameworks I often use.

Basics

Rust

The basics of Rust.

Actix-Web

Rust Frameworks

actix-web is a framework for writting web applications and REST APIs. Installation # To install: cargo add actix-web # Recommended for validation cargo add validator actix-web-validator Simple example #[get("/hello") async fn hello() -> Response { ...

Tracing

Rust Frameworks

Tracing is a library for logging. It consists of multiple libraries. You need at least tracing, which is the base of the logging system, and tracing_subscriber, which defines the subscriber of the tracing messages. # To install cargo add tracing tracing_subs...

TypeScript

Patterns

TypeScript

Exhaustive patterns In this case, exhaustive means "It covers all cases", e.g. for an enum, so when a new entry is added, it causes an error until this case is considered everywhere. Example with never: enum Status { Open, InProgress, Done, } ...

Tricks

Rust

Allow everything what can be a str reference   fn do_something<S: AsRef<str>>(input: S) { let input_str = input.as_ref(); println!("This is a &str: {}", input_str); } do_something("Hello World"); do_something("Hello World".to_string());  

Serde

Rust Frameworks

Serde (Serialize and Deserialize) is a library to serialize and deserialize data to or from a struct. This is usually used with language based crates like serde_json for JSON or serde_yaml for YAML. To use it, install it, and then you can use the derives on y...

Cross compilation

Rust

You can cross compile your Rust code using the target specifier. For example: cargo build --target x86_64-unknown-linux-gnu --release You can list all targets using rustup target list and add the targets you need. But often you need an environment with the c...

Check open ports

Linux

If you want to check open ports on your Linux device, you can use the ss command (socket statistics). Older versions may use netstat. ss Example: ss -tulpen Flags: -t → TCP -u → UDP -l → nur listening sockets -p → Prozess anzeigen -e → erweiterte In...

ffmpeg

Modify Images

ffmpeg

Resize ffmpeg -i input.jpg -vf "scale=1920:-1" output.jpg Change quality ffmpeg -i input.jpg -q:v 5 output.jpg Quality goes from 2 (best) to 31 (worst). 2-5 High quality 6-10 Good compression

Rasberry Pi Pico

Microcontrollers

Pinout A good website to look at the pinout: https://pico.pinout.xyz/  

config

Rust Frameworks

config (crates.io) is a library for building configuration structs from sources like env variables, yaml files and so on. You can combine it with validator to build a full configuration for your application. Install # Install config cargo add config cargo ...

Nuxt 4

Server

Nuxt 4

> TODO explain server engine, nitro h3 Endpoints export default defineEventHandler(async (event) => { // handle event here })   Middleware Plugins  

SeaORM

Rust Frameworks

SeaORM (from SeaQL) is an ORM for Rust. Installation  When Installing SeaORM, you need to define what Runtime to use and what database driver to use. TODO Install the CLI tool TODO Initialize migration To add migration, TODO: create initial migration, s...