Skip to content

Instantly share code, notes, and snippets.

@cafce25
cafce25 / index.html
Last active June 7, 2026 22:20
Slowly rotating conic gradient
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Like a record baby!</title>
<style>
:root {
--diagonal: calc(sqrt(2) * max(100vw, 100vh));
@cafce25
cafce25 / fn traits.rs
Last active February 7, 2022 17:41
Small example to compare Fn, FnMut and FnOnce
fn main() {
let y = String::new();
let mut x = String::new();
let onceclosure = move |s: String| {
let mut z = y;
z.extend(s.chars())
};
let mut mutclosure = |s: String| x.extend(s.chars());
let mut normalclosure = |_| {
//can't change the surrounding env