Tag:til
All the articles with the tag "til".
Using Cargo metadata query information about the project
Posted on:October 24, 2024Today I learned how to extract a package's version from a Rust project using cargo metadata.
Use ECR as a Pull Through Cache
Posted on:October 8, 2024Today I learned that the ECR Registry can function as a pull-through cache for Docker images or any OCI-compatible artifact, requiring a valid GitHub username/token with package READ access for configuration.
Fetch Calls in Astro With Relative Routes
Posted on:October 21, 2024Today I learned that when writing a fetch call without `useEffect` hooks, it executes during the initial server-side render requiring a fully qualified route, whereas wrapping it in a hook confines the fetch to the client-side, allowing the use of a relative route.
Multiple Pipelines in Gitlab
Posted on:October 7, 2024Today I share a solution for avoiding duplicate pipelines in GitLab by configuring workflow rules to differentiate between branch and merge request pipelines.
Kubernetes Cron Jobs Concurrency-Policy
Posted on:October 9, 2024Today I learned that by using the `concurrency-policy` in a CronJob specification, you can control whether jobs are allowed to run concurrently, ensuring that subsequent jobs do not start before the previous ones are completed.
Rust Lifetime Elision
Posted on:October 1, 2024Today I learned that Rust's lifetime elision rules can cause compilation issues when it incorrectly ties the output lifetime to an input, and this can be resolved by explicitly specifying unrelated lifetimes in the function signature.
Rust Infers Closure Types on First Call
Posted on:October 15, 2024Today I learned that in Rust, if you define a closure without specifying concrete types, Rust will infer the types upon the first use, and any subsequent use with different types will result in a compilation error.
Rust's Orphan Rule
Posted on:October 16, 2024Today I learned about the orphan rule in Rust, which restricts implementing a trait for a type unless either the trait or the type is defined in your crate, ensuring consistency and preventing conflicting implementations across different crates.