clap.zig
: Command line argumentdraw.zig
: Provide a canvas context 'like' interface for drawingio-adapter
:- Keyboard/mouse input + graphic output
- One adapter for SDL for now
misc.zig
:- Load a file
- Write an image (pgm or pam)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiler | |
CC = gcc | |
SANITIZEFLAGS=-fsanitize=address -fsanitize=undefined | |
# Compiler Flags | |
# -Wall -Wextra: Enable comprehensive warnings (recommended) | |
# -g: Include debugging symbols (for GDB) | |
# -std=c99: Specify C standard (or -std=c11, -std=gnu99 etc.) | |
# -O2: Optimization level (optional, use for release builds) |
// reference: https://popovicu.com/posts/789-kb-linux-without-mmu-riscv/
How to create a linux kernel that can run on a riscv32ima without an MMU.
- Download buildroot
- Untar it and start
make menuconfig
- In Target Options
- Target Architecture select RISCV
- In Target Architecture Size select 32
- In Target ABI select ilp32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some sane config values | |
EXTRACT_ALL = YES | |
CLASS_DIAGRAMS = YES | |
HIDE_UNDOC_RELATIONS = NO | |
HAVE_DOT = YES | |
CLASS_GRAPH = YES | |
COLLABORATION_GRAPH = YES | |
UML_LOOK = YES | |
UML_LIMIT_NUM_FIELDS = 50 | |
TEMPLATE_RELATIONS = YES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARTIFACTORY_DOMAIN=$(grep '^registry=' ~/.npmrc | awk -F'=' '{print $2}' | awk -F/ '{print $3}') | |
ARTIFACTORY_TOKEN=$(grep '^//${ARTIFACTORY_DOMAIN}' ~/.npmrc | \ | |
awk -F':' '{ print $2 }' | \ | |
awk -F'_auth=' '{ print $2 }' | \ | |
tr -d '"\r' | \ | |
base64 -d | \ | |
awk -F':' '{ print $2 }') | |
curl -H "Authorization: Bearer ${ARTIFACTORY_TOKEN}" \ | |
"https://${ARTIFACTORY_DOMAIN}/artifactory/api/storage/${PATH_TO_RESOURCE}?list&deep=1&listFolders=1&mdTimestamps=1" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Broken implementation | |
function hash(s) { | |
let hash = new Uint32Array(1); | |
hash[0] = 0; | |
for (let i = 0; i < s.length; ++i) { | |
const c = s[i].charCodeAt(0); | |
hash[0] += c; | |
hash[0] += (hash[0] << 10); | |
hash[0] ^= (hash[0] >> 6); | |
} |
Check you display configuration:
xrandr
To clone your computer screen to a different output:
xrandr --output <TV> --same-as <computer-screen>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rest | |
[ 9030.422503] xpad-dbg: 00000000: 00 00 0f 7f 7f 7f 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | |
[ 9030.422526] xpad-dbg: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | |
up | |
[ 9030.342505] xpad-dbg: 00000000: 00 00 0f 7f 00 7f 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | |
[ 9030.342529] xpad-dbg: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | |
down | |
[ 9054.410631] xpad-dbg: 00000000: 00 00 0f 7f ff 7f 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
State of the art: https://safjan.com/tools-for-doc-deskewing-and-dewarping/#what-to-use-for-unwarping-and-deskewing
vFlap: android app
List of apps: https://graphicdesign.stackexchange.com/questions/30948/best-way-to-flatten-a-curled-photographed-book-photograph
Process used: https://discourse.devontechnologies.com/t/three-cheers-for-the-free-vflat-app-for-de-warping-iphone-photos-of-book-pages/72523
Scan tailor, a QT app to stragithened scanned pages. https://github.com/scantailor/scantailor
NewerOlder