Skip to content

Instantly share code, notes, and snippets.

View sunsided's full-sized avatar
🇺🇦
#StandWithUkraine

Markus Mayer sunsided

🇺🇦
#StandWithUkraine
View GitHub Profile
@sunsided
sunsided / cargo crev review
Created December 7, 2023 15:17
cargo crev review
# Package Review of some-package 0.1.2
review:
thoroughness: low
understanding: medium
rating: positive
flags:
unmaintained: false
alternatives:
- source: https://crates.io
name: ''
@sunsided
sunsided / cargo crev verify.sh
Created December 7, 2023 15:06
cargo crev verify
$ cargo crev verify --show-all
status reviews issues owner downloads loc lpidx geiger flgs crate version latest_t
pass 1 3 0 0 0 2 17226K 183779K 870 178 101 ____ once_cell 1.8.0 ↑1.16.0
none 0 0 0 0 2 2 2807K 61575K 3371 57 1137 ____ bumpalo 3.8.0
none 0 2 0 0 0 1 8038K 125055K 5595 57 0 CB__ typenum 1.14.0 ↓1.11.2
pass 1 1 0 0 1 2 7059K 126074K 323 239 32 CB__ futures-core 0.3.17 =
none 0 2 0 0 1 1 35346K 197798K 4814 79 2193 CB__ memchr 2.4.1 ↓2.2.1
pass 3 8 0 0 1 2 167548K 192133K 134 418 8 ____ lazy_static 1.4.0 =
pass 1
@sunsided
sunsided / cargo crev repo fetch all.sh
Last active December 7, 2023 15:48
cargo crev repo fetch all
$ cargo crev repo fetch all
Fetching...
https://github.com/dpc/crev-proofs no updates
https://github.com/matklad/crev-proofs no updates
https://github.com/nbigaouette-eai/crev-proofs no updates
https://github.com/kornelski/crev-proofs no updates
https://github.com/toidiu/crev-proofs no updates
https://github.com/apoelstra/crev-proofs no updates
...
@sunsided
sunsided / cargo crev trust
Last active December 7, 2023 15:48
cargo crev trust
$ cargo crev trust --level high https://github.com/dpc/crev-proofs
Fetching https://github.com/dpc/crev-proofs...
https://github.com/dpc/crev-proofs no updates
Found proofs from:
193 FYlr8YoYGVvDwHQxqEIs89reKKDy-oWisoO0qXXEfHE (verified owner)
...
...
@sunsided
sunsided / cargo crev export output
Last active December 7, 2023 15:48
cargo crev ID export
version: -1
url: https://github.com/your-username/crev-proofs
public-key: ... some public key ...
sealed-secret-key: ... some secret key ...
seal-nonce: ... some seal nonce ...
pass:
version: 19
variant: argon2id
iterations: 192
memory-size: 4096
@sunsided
sunsided / cargo-crev-new-id.sh
Last active February 1, 2025 11:31
cargo-crev new ID
# Create your new identity for your proof repository
cargo crev id new --url https://github.com/your-username/crev-proofs
# Publish your identity to the proof repository
cargo crev publish
@sunsided
sunsided / coding-stats.json
Last active April 29, 2025 12:06
Coding Statistics
{
"avg_s_per_active_day": 11670.15,
"avg_s_per_day": 8606.36,
"editors": {
"Bash": {
"avg_s_per_use_day": 5528.05,
"max_s_per_use_day": 39848.644,
"total_seconds": 1934818.783,
"use_days": 350
},
@sunsided
sunsided / tranters_correction_table.m
Created July 16, 2022 11:04
Tranter's correction table in Matlab
hours = [2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24];
fitness = [15, 20, 25, 30, 40, 50];
table = [1, 1.5, 2, 2.75, 3.5, 4.5, 5.5, 6.75, 7.75, 10, 12.5, 14.5, 17, 19.5, 22, 24;
1.25, 2.25, 3.25, 4.5, 5.5, 6.7, 7.75, 8.75, 10, 12.5, 15, 17.5, 20, 23, NaN, NaN;
1.5, 3, 4.25, 5.5, 7, 8.5, 10, 11.5, 13.25, 15, 17.5, NaN, NaN, NaN, NaN, NaN;
2, 3.5, 5, 6.75, 8.5, 10.5, 12.5, 14.5, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN;
2.75, 4.25, 5.75, 7.5, 9.5, 11.5, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN;
3.25, 4.75, 6.5, 8.5, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN];
@sunsided
sunsided / tobler.m
Created July 16, 2022 11:02
Tobler's rule in Matlab
function [w] = tobler(slope, scaling)
w = scaling*6*exp(-3.5 * abs(slope+0.05));
end
@sunsided
sunsided / naismith_al.m
Created July 16, 2022 11:01
Naismith's rule with Aitken-Langmuir corrections in Matlab, units in km and h
function [w, t, slope] = naismith_al(length, ascend, base_speed)
if ~exist('base_speed', 'var')
base_speed = 4; % km/h
end
slope = ascend/length;
t = length*(1/base_speed);
if slope >= 0
t = t + ascend*(1/0.6);