Skip to content

Instantly share code, notes, and snippets.

View debuti's full-sized avatar
😀

Borja Garcia debuti

😀
  • Spain
View GitHub Profile
@debuti
debuti / playground.rs
Last active November 13, 2019 19:02 — forked from rust-play/playground.rs
Rust Playground: multiple mutable references to mutexed struct fields
use std::sync::{Arc, Mutex};
pub struct Foo {
pub a: i32,
pub b: i32,
}
pub fn function(foo: Arc<Mutex<Foo>>){
let foo = &mut *(foo.lock().unwrap());
inner(&mut foo.a, &mut foo.b);
@debuti
debuti / timelapse.md
Last active August 22, 2019 07:45 — forked from alexellis/timelapse.md
ffmpeg time-lapse

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

@debuti
debuti / dbxcli-getr
Last active December 20, 2022 02:18 — forked from shadiakiki1986/README.md
Wrap "dbxcli get" command to download files from a dropbox dir recursively
#!/usr/bin/env python3
import os
import sys
import subprocess
import re
import argparse
import hashlib
args = None