Skip to content

Instantly share code, notes, and snippets.

View oldtune's full-sized avatar
🤪
Quack Quack!

Quack Quack oldtune

🤪
Quack Quack!
View GitHub Profile
@philipjkim
philipjkim / iter_test.rs
Last active March 15, 2024 00:15
Rust: Difference between iter(), into_iter(), and iter_mut()
#[test]
fn iter_demo() {
let v1 = vec![1, 2, 3];
let mut v1_iter = v1.iter();
// iter() returns an iterator of slices.
assert_eq!(v1_iter.next(), Some(&1));
assert_eq!(v1_iter.next(), Some(&2));
assert_eq!(v1_iter.next(), Some(&3));
assert_eq!(v1_iter.next(), None);
@subfuzion
subfuzion / curl.md
Last active September 27, 2024 01:43
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.