Skip to content

Instantly share code, notes, and snippets.

View ha7ilm's full-sized avatar
🇭🇺

András Retzler ha7ilm

🇭🇺
View GitHub Profile
@chabala
chabala / using-google-takeout.md
Last active April 19, 2025 08:33
Merge and extract tgz files from Google Takeout

Recently found some clowny gist was the top result for 'google takeout multiple tgz', where it was using two bash scripts to extract all the tgz files and then merge them together. Don't do that. Use brace expansion, cat the TGZs, and extract:

$ cat takeout-20201023T123551Z-{001..011}.tgz | tar xzivf -

You don't even need to use brace expansion. Globbing will order the files numerically:

$ cat takeout-20201023T123551Z-*.tgz | tar xzivf -
function [casadi_expr] = mupad2casadi(mupad_expr,mupad_var,casadi_var)
s = size(mupad_expr);
assert(numel(s)<=2, 'Tensors not supported. Make a vector or matrix from the mupad expression first.');
mupad_expr = mupad_expr(:);
matlabFunction(symfun(mupad_expr,mupad_var),'File','temp_fun.m');
clear temp_fun
args = vertsplit(casadi_var);
casadi_expr = temp_fun(args{:});
@masak
masak / explanation.md
Last active April 10, 2025 16:42
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <[email protected]>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.