Skip to content

Instantly share code, notes, and snippets.

@Gnosnay
Gnosnay / update-ssh-config.md
Last active May 19, 2024 08:23
SSH doesn't work when upgrade MacOS to Ventura 13.0.1

SSH doesn't work when upgrade MacOS to Ventura 13.0.1

Problems

After you upgrade your MacOS to Ventura 13.0.1 you may meet following problem:

16:14:32 › ssh -vvvvvv 10.123.1.1
OpenSSH_9.0p1, LibreSSL 3.3.6
debug1: Reading configuration data /Users/my-user/.ssh/config
debug1: /Users/my-user/.ssh/config line 19: Applying options for 10.123.1.1
@Gnosnay
Gnosnay / has_common_part.rs
Created July 4, 2020 18:10
check whether two range have common part
use std::cmp::Ordering;
use std::ops::Range;
pub fn has_common_part<T: Ord>(a: Range<T>, b: Range<T>) -> bool {
match a.start.cmp(&b.start) {
Ordering::Equal => true,
Ordering::Less => if let Ordering::Greater = a.end.cmp(&b.start) { true } else { false }
Ordering::Greater => if let Ordering::Less = a.start.cmp(&b.end) { true } else { false }
}
}