Skip to content

Instantly share code, notes, and snippets.

View fcabestre's full-sized avatar
🏠
Working from home

Frédéric Cabestre fcabestre

🏠
Working from home
  • SIGUSR
  • Toulouse (France)
  • 21:30 (UTC +02:00)
  • X @fcabestre
View GitHub Profile
@d-plaindoux
d-plaindoux / comprehension.rs
Last active September 7, 2018 08:20
Simple comprehension macro in Rust
#[macro_export]
macro_rules! comprehension {
(($expr:expr) | $id:ident <- ($range:expr) if $cond:expr) => {{
let mut result = Vec::default();
for $id in $range {
if $cond {
result.push($expr);
}
}
@bollwyvl
bollwyvl / README.md
Last active August 7, 2023 08:33
RevealJS SVG fragment presenter

SVG fragment builds for reveal.js

Basic use case

  • make an SVG (maybe in inkscape)
    • save it someplace reveal.js can find it (maybe next to your presentation)
    • figure out how to identify them (maybe use named layers)
  • in reveal.js/index.html
    • add reveal-svg-fragment.js as a dependency
    • in a <section> of reveal.js markup
  • add data-svg-fragment="" to something, e.g.