Create a unit file in /etc/systemd/system
named foo.service.
Then:
sudo systemctl start foo
If the file is modified:
sudo systemctl daemon-reload
// cc -I/usr/include/hidapi/ -ggdb3 mouse.c -lhidapi-hidraw -o mouse | |
#include <stdio.h> // printf | |
#include <wchar.h> // wchar_t | |
#include <hidapi.h> | |
#include <string.h> | |
#define MAX_STR 255 | |
int main(int argc, char* argv[]) |
Program linkers link object file together to create either:
Dynamic linkers link the executing program to a shared library at runtime.
Defined symbols are static objects within the source code that are defined for the entirety of the program (function or global and static variables).
The the glic version used by an executable:
objdump -T /usr/bin/ls | grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu | tail -1
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 |