Skip to content

Instantly share code, notes, and snippets.

View mmathys's full-sized avatar
👽
专注

Max Mathys mmathys

👽
专注
  • Lakera AI
  • Zurich, Switzerland
  • 22:11 (UTC +02:00)
View GitHub Profile
@mmathys
mmathys / vimeo-vod.md
Last active December 13, 2023 19:19
Download Vimeo VOD (video on demand)

How to download vimeo VOD for offline usage

Variant 1

Use youtube-dl directly to download the video (thanks @meepybub!) Example:

youtube-dl -u <youremailaddress@example.com> "https://vimeo.com/ondemand/<video>"
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCpHkE3mQvAbYuWndjy3gwus94zgAJuP51swsa/qgg5dC+oPN9zIvtfmWYk1d8ua6oN24vKAAo5AHDD8rGdJVVVU9TM7zOyJTYM8lN9Q9KlgVwQQhUpfI8Uw/qA7KxQKLHzqTFcH0iaRqZCXNMlYwolMzLXCAC3KpJoRLC+XNPcbN/L9wVFJU5UhtlEy+XEZeGn6uJjK/WVPpLcBrZPSNbOp22F6GeD2sUTSZpAYM9PQwrx5xe7umJROHwOgRYkz99QvJMRTvPdg1nx6lIsikpao3yiieTpvYfYlQ0mObUCYPcx7/9FeCENthQsWrIaQsC6sFvZFh+UbmKCAm+wn+cf max@Maxs-Air
// to compile run: g++ -std=gnu++11 cubic_spline.cpp -lmgl
#include <iostream>
#include <eigen3/Eigen/Dense>
#include <mgl2/mgl.h>
using namespace Eigen;
using namespace std;
MatrixXd cubicSpline(const VectorXd &T, const VectorXd &Y)
{
@mmathys
mmathys / cubic_spline.cpp
Created December 3, 2018 08:18
cubic spline vero
// to compile run: g++ -std=gnu++11 cubic_spline.cpp -lmgl
#include <iostream>
#include <eigen3/Eigen/Dense>
#include <mgl2/mgl.h>
using namespace Eigen;
using namespace std;
MatrixXd cubicSpline(const VectorXd &T, const VectorXd &Y)
{
@mmathys
mmathys / mm.c
Created October 19, 2018 08:48
cheers vero
/*
* mm-naive.c - The fastest, least memory-efficient malloc package.
*
* In this naive approach, a block is allocated by simply incrementing
* the brk pointer. A block is pure payload. There are no headers or
* footers. Blocks are never coalesced or reused. Realloc is
* implemented directly using mm_malloc and mm_free.
*
* NOTE TO STUDENTS: Replace this header comment with your own header
* comment that gives a high level description of your solution.
@mmathys
mmathys / bg.gif
Last active October 12, 2018 15:21
bg.gif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/**
*
* Question: Why don't the last two strings show up correctly in the terminal?
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct Tuple {
char* firstWord;
int wordCount;
};
struct Tuple processString(char* string) {
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct Tuple {
char* firstWord;
int wordCount;
};
struct Tuple processString(char* string) {
atomic {
if(exp1 != val1.get() || exp2 != val2.get()) {
return false;
}
val1.set(up1);
val2.set(up2);
return true;
}