https://docs.conan.io/2/tutorial/consuming_packages/build_simple_cmake_project.html
curl -OL https://github.com/conan-io/conan/releases/download/2.5.0/conan-2.5.0-linux-x86_64.tgz
tar zxf conan-2.5.0-linux-x86_64.tgz
https://docs.conan.io/2/tutorial/consuming_packages/build_simple_cmake_project.html
curl -OL https://github.com/conan-io/conan/releases/download/2.5.0/conan-2.5.0-linux-x86_64.tgz
tar zxf conan-2.5.0-linux-x86_64.tgz
from https://www.yingtongli.me/blog/2018/07/30/kobo-rego.html | |
- Do not connect the device to the WiFi. | |
- Plug the USB cable to your computer | |
- In a termina, open the mass storage device that appear. | |
```bash | |
cd .kobo | |
sqlite3 KoboReader.sqlite | |
``` | |
Then: |
const std = @import("std"); | |
const stdout = std.io.getStdOut().writer(); | |
const Type = enum(u3) { | |
COEUR = 0b000, | |
CARREAU = 0b001, | |
PIQUE = 0b010, | |
TREFLE = 0b011, | |
ATOUT = 0b100, |
# Mingle ls/xargs/extension substitution | |
ls somepath/*.txt | xargs -n1 -i bash -c 'echo cp "$1" "${1%.txt}.dat"' - '{}' | |
# - `-n1` will make xargs take only one parameter at a time instead of the whole list of files. | |
# - Using a bash command allows to pass {} (which is a xargs args) to the shell and perform substitution on it | |
# source: | |
# https://stackoverflow.com/a/965072/2603925 | |
# https://stackoverflow.com/a/45895212/2603925 | |
# https://stackoverflow.com/a/64924231/2603925 |
wget \ | |
--mirror \ | |
--convert-links \ | |
--adjust-extension \ | |
--page-requisites \ | |
--no-parent --execute robots=off \ | |
--user-agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" \ | |
<url> |
//g++ main.cc -O3 -o test -lX11 && ./test | |
#include <chrono> | |
#include <iostream> | |
#include <string> | |
#include "CImg.h" | |
using namespace cimg_library; | |
int main(int argc,char **argv) { | |
const unsigned char white[] = { 255, 255, 255 }; |
#!/usr/bin/env bash | |
# reference: https://medium.com/@acrodriguez/one-liner-to-generate-a-markdown-toc-f5292112fd14 | |
function printusage { | |
echo "Usage: $0 <minimum-level> <maximum-level> <markdown-file.md>" | |
echo "" | |
echo "Example:" | |
echo " $0 2 5 README.md" | |
} |
cd /tmp && \
mkdir auto-subtitle && cd auto-subtitle && \
python3 -mvenv venv && \
source venv/bin/activate && \
pip install git+https://github.com/m1guelpf/auto-subtitle.git && \
pip install ffmpeg-python && \
python3 auto_subtitle /path/to/video.mp4 -o subtitled/