Skip to content

Instantly share code, notes, and snippets.

View cacko's full-sized avatar
💭
I may be slow to respond, most likely never

cacko cacko

💭
I may be slow to respond, most likely never
View GitHub Profile
@cacko
cacko / gist:d99e8fc65bb87da79e1c269f55efdbfd
Created September 24, 2025 16:55
libc++abi: terminating due to uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument
download tensorflow and related things to 2.19
@cacko
cacko / iso2flat.php
Last active May 3, 2024 11:02
iso2flag
<?php
$iso2flag = fn(string $code) => array_reduce(str_split($code),fn($res,$c) => $res.mb_chr(ord(strtoupper($c)) % 32 + 0x1F1E5),"" );
@cacko
cacko / .zprofile
Created December 26, 2021 02:36
markdown less alias
function mless() {
PASSED=$1
if [[ -d $PASSED ]]; then
return 0
elif [[ -f $PASSED ]]; then
pandoc --from markdown --to plain "$1" | less
else
return 0
fi
}
@cacko
cacko / gist:a70ea808b7ecb6f1d17d6d0b0ca55224
Last active August 10, 2021 23:44
stupid count question again and again, let them try this obfuscatd solution
<?php
$string = "floccinaucinihilipilification";
$p = array_combine(array_map('chr', array_keys($res = count_chars($string, 1))), $res);
$z = array_reduce(array_keys($counts = count_chars($string, 1)), fn($res, $chr) => $res + [chr($chr) => $counts[$chr]], []);