From 5f268f85571a1ecee2307d25256f54cc93fcd041 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Sun, 12 May 2024 23:22:38 +0700 Subject: [PATCH] feat: use jxl --- docs/2023-04-01-games.html | 12 ++-- docs/2023-04-17-keeb.html | 84 +++++++++++----------- docs/2023-05-03-neovim.html | 4 +- docs/2023-06-06-terminal-workflow.html | 7 +- docs/2023-07-01-pastebin.html | 97 +++++--------------------- docs/2023-08-09-vscode.html | 4 +- posts/2023-04-01-games.md | 6 +- posts/2023-04-17-keeb.md | 42 +++++------ posts/2023-05-03-neovim.md | 2 +- posts/2023-06-06-terminal-workflow.md | 3 +- posts/2023-07-01-pastebin.md | 74 ++++---------------- posts/2023-08-09-vscode.md | 2 +- 12 files changed, 115 insertions(+), 222 deletions(-) diff --git a/docs/2023-04-01-games.html b/docs/2023-04-01-games.html index db06cc3..c6ed775 100644 --- a/docs/2023-04-01-games.html +++ b/docs/2023-04-01-games.html @@ -81,9 +81,9 @@ pcsx2-000 @@ -115,9 +115,9 @@ pcsx2-001 @@ -214,9 +214,9 @@ patch=1,EE,2012009C,extended,00000000pcsx2-005 diff --git a/docs/2023-04-17-keeb.html b/docs/2023-04-17-keeb.html index d610910..3f3bce2 100644 --- a/docs/2023-04-17-keeb.html +++ b/docs/2023-04-17-keeb.html @@ -96,36 +96,36 @@ keeb-009 keeb-010 keeb-011 keeb-012 @@ -135,9 +135,9 @@ keeb-001 @@ -146,9 +146,9 @@ keeb-002 @@ -157,9 +157,9 @@ keeb-003 @@ -168,9 +168,9 @@ keeb-006 @@ -200,9 +200,9 @@ keeb-004 @@ -382,9 +382,9 @@ keeb-007 @@ -450,9 +450,9 @@ keeb-008 @@ -490,9 +490,9 @@ keeb-015 @@ -530,18 +530,18 @@ keeb-016 keeb-017 @@ -593,9 +593,9 @@ keeb-019 @@ -672,9 +672,9 @@ keeb-013 @@ -683,9 +683,9 @@ keeb-014 @@ -722,9 +722,9 @@ keeb-018 @@ -754,9 +754,9 @@ keeb-020 @@ -765,9 +765,9 @@ keeb-022 @@ -797,9 +797,9 @@ keeb-021 diff --git a/docs/2023-05-03-neovim.html b/docs/2023-05-03-neovim.html index 6ff9ae8..5336275 100644 --- a/docs/2023-05-03-neovim.html +++ b/docs/2023-05-03-neovim.html @@ -58,9 +58,9 @@ nvim-000 diff --git a/docs/2023-06-06-terminal-workflow.html b/docs/2023-06-06-terminal-workflow.html index 4e7379a..6315863 100644 --- a/docs/2023-06-06-terminal-workflow.html +++ b/docs/2023-06-06-terminal-workflow.html @@ -92,11 +92,11 @@

@@ -104,7 +104,6 @@
  • ALT-P: switch panel
  • ALT-N: new panel vertically (right side)
  • ALT-M: new panel horizontally (down side)
  • -
  • ALT-O: new tab
  • ALT-]/ALT-[: next/previous tab
  • Hold SHIFT and click on links, text, ...
  • diff --git a/docs/2023-07-01-pastebin.html b/docs/2023-07-01-pastebin.html index 4dcaff8..566fead 100644 --- a/docs/2023-07-01-pastebin.html +++ b/docs/2023-07-01-pastebin.html @@ -451,95 +451,34 @@ rsync -avzP src/ dst

    Rename:

    -
    # If want dry run, remove -x
    -f2 -r "{mtime.YYYY}{mtime.MM}{mtime.DD}.{mtime.H}{mtime.mm}{mtime.ss}{ext}" -F -x
    +
    # If dry run, remove --exec
    +f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}{ext}" --fix-conflicts --exec
    +
    +# Include ImageSize (require exiftool)
    +f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{xt.ImageSize}{ext}" --fix-conflicts --exec
    +
    +# Remove space in directory
    +f2 --find " " --replace "_" --string-mode --only-dir --exec

    - Instaloader + libvips

    -
    -

    args.txt:

    -
    -
    ---no-video-thumbnails
    ---no-captions
    ---no-metadata-json
    ---stories
    ---fast-update
    ---sanitize-paths
    ---abort-on=302,400,429
    ---no-iphone
    -
    -

    login.txt:

    -
    -
    ---login=your_insta_username
    ---sessionfile=where/sessionfile/store
    -
    -

    Run:

    -
    -
    instaloader +login.txt +args.txt +targets.txt
    -
    -
    -

    - gRPCurl -

    -
    +

    Convert:

    -
    grpcurl -proto path/file.proto \
    -    -d '{"key": "value", "timestamp": "1997-04-01T00:00:00Z"}' \
    -    internal-social.zalopay.vn:443 \
    -    pkg.Service/GetData
    -
    -
    -

    - Zed -

    - -
    -

    Settings:

    -
    -
    {
    -  "telemetry": {
    -    "diagnostics": false,
    -    "metrics": false
    -  },
    -  "vim_mode": true,
    -  "language_overrides": {
    -    "JSON": {
    -      "format_on_save": "off",
    -      "formatter": {
    -        "external": {
    -          "command": "prettier",
    -          "arguments": ["--stdin-filepath", "{buffer_path}"]
    -        }
    -      }
    -    }
    -  }
    -}
    +
    vips jxlsave filename.jpg filename.jxl --keep=none
    +
    +# Batch convert (require fd)
    +fd "jpg|jpeg|png|webp" --exec vips jxlsave {} {.}.jxl --keep=none
    +fd "jpg|jpeg|png|webp" --exec-batch rm
    diff --git a/docs/2023-08-09-vscode.html b/docs/2023-08-09-vscode.html index 54ae6bb..05b0765 100644 --- a/docs/2023-08-09-vscode.html +++ b/docs/2023-08-09-vscode.html @@ -58,9 +58,9 @@ vscode-000 diff --git a/posts/2023-04-01-games.md b/posts/2023-04-01-games.md index 3cb2a01..22f050b 100644 --- a/posts/2023-04-01-games.md +++ b/posts/2023-04-01-games.md @@ -14,7 +14,7 @@ If below links die, I will try to scrape Internet to get a new link. I use [PCSX2](https://github.com/PCSX2/pcsx2). Currently it supports macOS on nightly builds, but it's good enough. -![pcsx2-000](https://raw.githubusercontent.com/haunt98/posts-images/main/pcsx2-000.png) +![pcsx2-000](https://raw.githubusercontent.com/haunt98/posts-images/main/pcsx2-000.jxl) Should download BIOS, I go with USA version: @@ -24,7 +24,7 @@ Should download BIOS, I go with USA version: Should enable cheats: -![pcsx2-001](https://raw.githubusercontent.com/haunt98/posts-images/main/pcsx2-001.png) +![pcsx2-001](https://raw.githubusercontent.com/haunt98/posts-images/main/pcsx2-001.jxl) For cover art of games, please use [xlenore/ps2-covers](https://github.com/xlenore/ps2-covers). @@ -72,7 +72,7 @@ patch=1,EE,2012009C,extended,00000000 Beautiful result! -![pcsx2-005](https://raw.githubusercontent.com/haunt98/posts-images/main/pcsx2-005.png) +![pcsx2-005](https://raw.githubusercontent.com/haunt98/posts-images/main/pcsx2-005.jxl) ### Mega Man X Collection diff --git a/posts/2023-04-17-keeb.md b/posts/2023-04-17-keeb.md index 4e0bc05..7677d85 100644 --- a/posts/2023-04-17-keeb.md +++ b/posts/2023-04-17-keeb.md @@ -16,20 +16,20 @@ Damn it's so loud :D I bought it from my friend. -![keeb-009](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-009.png) -![keeb-010](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-010.png) -![keeb-011](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-011.png) -![keeb-012](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-012.png) +![keeb-009](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-009.jxl) +![keeb-010](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-010.jxl) +![keeb-011](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-011.jxl) +![keeb-012](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-012.jxl) Specs: -![keeb-001](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-001.webp) +![keeb-001](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-001.jxl) -![keeb-002](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-002.webp) +![keeb-002](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-002.jxl) -![keeb-003](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-003.webp) +![keeb-003](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-003.jxl) -![keeb-006](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-006.webp) +![keeb-006](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-006.jxl) - USB-C - Plate: PC @@ -45,7 +45,7 @@ My layout is based on: - [HHKB layout](https://hhkb.io/layout/) -![keeb-004](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-004.png) +![keeb-004](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-004.jxl) My layout's **quirk/gotcha**: @@ -106,7 +106,7 @@ Things I don't like: Buy it from ShopeeVN. I choose this switch because I prefer linear (please be silent). -![keeb-007](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-007.jpg) +![keeb-007](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-007.jxl) Specs: @@ -132,7 +132,7 @@ Support links: I was given this switch by my friend. Currently using for alpha keys. Love the silent. -![keeb-008](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-008.webp) +![keeb-008](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-008.jxl) Specs: @@ -149,7 +149,7 @@ Support links: ### JWICK Yellow Linear Switch -![keeb-015](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-015.jpg) +![keeb-015](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-015.jxl) I was given this switch by my friend, full mod (lube + film). @@ -169,8 +169,8 @@ Support links: ### C3 Equalz Tangerine V2 -![keeb-016](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-016.webp) -![keeb-017](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-017.webp) +![keeb-016](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-016.jxl) +![keeb-017](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-017.jxl) Buy it from ShopeeVN, friends told it's smooth. I buy the heavier aka 67g. @@ -190,7 +190,7 @@ Support links: ### CHERRY MX2A Black -![keeb-019](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-019.png) +![keeb-019](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-019.jxl) Buy it as I always love Cherry Black. But buy it too soon so I only got 3-pin version. @@ -225,9 +225,9 @@ Be careful: I buy vim kit first then base later. -![keeb-013](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-013.webp) +![keeb-013](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-013.jxl) -![keeb-014](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-014.webp) +![keeb-014](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-014.jxl) Support links: @@ -238,7 +238,7 @@ Support links: I only buy 40s kit. -![keeb-018](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-018.webp) +![keeb-018](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-018.jxl) Support links: @@ -248,9 +248,9 @@ Support links: I bought Blue version with Base, Novel, Space kit from bidding. -![keeb-020](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-020.webp) +![keeb-020](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-020.jxl) -![keeb-022](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-022.webp) +![keeb-022](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-022.jxl) Support links: @@ -260,7 +260,7 @@ Support links: I only bought Base kit. -![keeb-021](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-021.webp) +![keeb-021](https://raw.githubusercontent.com/haunt98/posts-images/main/keeb-021.jxl) Support links: diff --git a/posts/2023-05-03-neovim.md b/posts/2023-05-03-neovim.md index 2a523bf..ebbf2c2 100644 --- a/posts/2023-05-03-neovim.md +++ b/posts/2023-05-03-neovim.md @@ -1,6 +1,6 @@ # My neovim workflow -![nvim-000](https://raw.githubusercontent.com/haunt98/posts-images/main/nvim-000.png) +![nvim-000](https://raw.githubusercontent.com/haunt98/posts-images/main/nvim-000.jxl) All configs are in [my dotfiles](https://github.com/haunt98/dotfiles). diff --git a/posts/2023-06-06-terminal-workflow.md b/posts/2023-06-06-terminal-workflow.md index 0606a4f..282523a 100644 --- a/posts/2023-06-06-terminal-workflow.md +++ b/posts/2023-06-06-terminal-workflow.md @@ -9,11 +9,10 @@ All configs are in [my dotfiles](https://github.com/haunt98/dotfiles). ## Use [zellij-org/zellij](https://github.com/zellij-org/zellij) as guide keybinding -![](https://zellij.dev/documentation/img/overview-status-tab-2.png) +![](https://zellij.dev/documentation/img/overview-status-tab-2.jxl) - `ALT-P`: switch panel - `ALT-N`: new panel vertically (right side) - `ALT-M`: new panel horizontally (down side) -- `ALT-O`: new tab - `ALT-]`/`ALT-[`: next/previous tab - Hold `SHIFT` and click on links, text, ... diff --git a/posts/2023-07-01-pastebin.md b/posts/2023-07-01-pastebin.md index 4b68db6..8cfc284 100644 --- a/posts/2023-07-01-pastebin.md +++ b/posts/2023-07-01-pastebin.md @@ -322,68 +322,24 @@ cat /dev/null > ~/.zsh_history Rename: ```sh -# If want dry run, remove -x -f2 -r "{mtime.YYYY}{mtime.MM}{mtime.DD}.{mtime.H}{mtime.mm}{mtime.ss}{ext}" -F -x +# If dry run, remove --exec +f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}{ext}" --fix-conflicts --exec + +# Include ImageSize (require exiftool) +f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{xt.ImageSize}{ext}" --fix-conflicts --exec + +# Remove space in directory +f2 --find " " --replace "_" --string-mode --only-dir --exec ``` -## [Instaloader](https://github.com/instaloader/instaloader) +## [libvips](https://github.com/libvips/libvips) -`args.txt`: - -```txt ---no-video-thumbnails ---no-captions ---no-metadata-json ---stories ---fast-update ---sanitize-paths ---abort-on=302,400,429 ---no-iphone -``` - -`login.txt`: - -```txt ---login=your_insta_username ---sessionfile=where/sessionfile/store -``` - -Run: - -```txt -instaloader +login.txt +args.txt +targets.txt -``` - -## [gRPCurl](https://github.com/fullstorydev/grpcurl) +Convert: ```sh -grpcurl -proto path/file.proto \ - -d '{"key": "value", "timestamp": "1997-04-01T00:00:00Z"}' \ - internal-social.zalopay.vn:443 \ - pkg.Service/GetData -``` - -## [Zed](https://github.com/zed-industries/zed) - -Settings: - -```json -{ - "telemetry": { - "diagnostics": false, - "metrics": false - }, - "vim_mode": true, - "language_overrides": { - "JSON": { - "format_on_save": "off", - "formatter": { - "external": { - "command": "prettier", - "arguments": ["--stdin-filepath", "{buffer_path}"] - } - } - } - } -} +vips jxlsave filename.jpg filename.jxl --keep=none + +# Batch convert (require fd) +fd "jpg|jpeg|png|webp" --exec vips jxlsave {} {.}.jxl --keep=none +fd "jpg|jpeg|png|webp" --exec-batch rm ``` diff --git a/posts/2023-08-09-vscode.md b/posts/2023-08-09-vscode.md index 7bd9d10..d952c4e 100644 --- a/posts/2023-08-09-vscode.md +++ b/posts/2023-08-09-vscode.md @@ -1,6 +1,6 @@ # VSCode -![vscode-000](https://raw.githubusercontent.com/haunt98/posts-images/main/vscode-000.png) +![vscode-000](https://raw.githubusercontent.com/haunt98/posts-images/main/vscode-000.jxl) Favortite settings everytime I install VSCode.