From 11a7b9b66ce34258a895d2d875fe1e7c0a278b9c Mon Sep 17 00:00:00 2001 From: Ngô Ngọc Đức Huy Date: Wed, 24 Apr 2024 22:47:39 +0700 Subject: Rename TIL to software notes --- content/sw-notes/_index.fr.md | 7 +++++ content/sw-notes/_index.md | 8 +++++ content/sw-notes/devtool-theme.md | 13 ++++++++ content/sw-notes/ffmpeg-cut-video.md | 14 +++++++++ content/sw-notes/ffmpeg-remove-audio.md | 9 ++++++ content/sw-notes/insert-unicode.md | 16 ++++++++++ content/sw-notes/json-output-format.fr.md | 13 ++++++++ content/sw-notes/json-output-format.md | 16 ++++++++++ .../keepassxc-enable-desktop-integration.md | 10 ++++++ content/sw-notes/nheko-plain-creds.md | 18 +++++++++++ content/sw-notes/regex-unicode.md | 15 +++++++++ content/sw-notes/socks-proxy.md | 34 +++++++++++++++++++++ content/sw-notes/vim-jp.fr.md | 15 +++++++++ content/sw-notes/vim-jp.md | 15 +++++++++ content/sw-notes/vim-paste-command.md | 11 +++++++ content/sw-notes/vim-paste-file.md | 9 ++++++ content/til/_index.fr.md | 9 ------ content/til/_index.md | 7 ----- content/til/css-exfil.md | 10 ------ content/til/default_light.png | Bin 172363 -> 0 bytes content/til/devtool-theme.md | 13 -------- content/til/emulate_dark.png | Bin 177040 -> 0 bytes content/til/insert-unicode.md | 16 ---------- content/til/json-output-format.fr.md | 12 -------- content/til/json-output-format.md | 15 --------- content/til/regex-unicode.md | 14 --------- content/til/vim-jp.fr.md | 14 --------- content/til/vim-jp.md | 14 --------- content/til/vim-paste-file.md | 8 ----- static/images/default_light.png | Bin 0 -> 172363 bytes static/images/emulate_dark.png | Bin 0 -> 177040 bytes 31 files changed, 223 insertions(+), 132 deletions(-) create mode 100644 content/sw-notes/_index.fr.md create mode 100644 content/sw-notes/_index.md create mode 100644 content/sw-notes/devtool-theme.md create mode 100644 content/sw-notes/ffmpeg-cut-video.md create mode 100644 content/sw-notes/ffmpeg-remove-audio.md create mode 100644 content/sw-notes/insert-unicode.md create mode 100644 content/sw-notes/json-output-format.fr.md create mode 100644 content/sw-notes/json-output-format.md create mode 100644 content/sw-notes/keepassxc-enable-desktop-integration.md create mode 100644 content/sw-notes/nheko-plain-creds.md create mode 100644 content/sw-notes/regex-unicode.md create mode 100644 content/sw-notes/socks-proxy.md create mode 100644 content/sw-notes/vim-jp.fr.md create mode 100644 content/sw-notes/vim-jp.md create mode 100644 content/sw-notes/vim-paste-command.md create mode 100644 content/sw-notes/vim-paste-file.md delete mode 100644 content/til/_index.fr.md delete mode 100644 content/til/_index.md delete mode 100644 content/til/css-exfil.md delete mode 100644 content/til/default_light.png delete mode 100644 content/til/devtool-theme.md delete mode 100644 content/til/emulate_dark.png delete mode 100644 content/til/insert-unicode.md delete mode 100644 content/til/json-output-format.fr.md delete mode 100644 content/til/json-output-format.md delete mode 100644 content/til/regex-unicode.md delete mode 100644 content/til/vim-jp.fr.md delete mode 100644 content/til/vim-jp.md delete mode 100644 content/til/vim-paste-file.md create mode 100644 static/images/default_light.png create mode 100644 static/images/emulate_dark.png diff --git a/content/sw-notes/_index.fr.md b/content/sw-notes/_index.fr.md new file mode 100644 index 0000000..d7b0783 --- /dev/null +++ b/content/sw-notes/_index.fr.md @@ -0,0 +1,7 @@ +--- +title: Notes d'usage des logiciels +--- + +Lire l'instruction pour utiliser un programme, ce n'est pas toujours simple. +Parfois les pas sont très simples, mais les rechercher ça prend du temps et se +souvenir d'eux, c'est trop fatiguant. Alors, je les note ici. diff --git a/content/sw-notes/_index.md b/content/sw-notes/_index.md new file mode 100644 index 0000000..717b351 --- /dev/null +++ b/content/sw-notes/_index.md @@ -0,0 +1,8 @@ +--- +title: Software usage notes +--- + +Here are short notes on using some programs. Reading manuals is not always +intuitive or quick, even though the steps are so simple; so I collect them +here. Notes that are longer than a few lines are collected in the main blog +instead. diff --git a/content/sw-notes/devtool-theme.md b/content/sw-notes/devtool-theme.md new file mode 100644 index 0000000..603ec1b --- /dev/null +++ b/content/sw-notes/devtool-theme.md @@ -0,0 +1,13 @@ +--- +categories: [software, guide] +title: "Emulate system theme with firefox's devtools" +date: 2021-05-03T11:15:35+07:00 +tag: [firefox, css, theme] +--- + +Firefox's devtool provides you with a tool to emulate +dark/light mode (probably Chrome does, too). It can be useful for front-end +developers when they want to design a system-based theme switch. + +![My default theme, light theme](/images/default_light.png) +![After choosing dark mode emulation](/images/emulate_dark.png) diff --git a/content/sw-notes/ffmpeg-cut-video.md b/content/sw-notes/ffmpeg-cut-video.md new file mode 100644 index 0000000..fb95f08 --- /dev/null +++ b/content/sw-notes/ffmpeg-cut-video.md @@ -0,0 +1,14 @@ +--- +title: "How to cut videos with ffmpeg" +date: 2024-04-24 +translationKey: ffmpeg-cut-video +categories: [software, guide] +tags: [ffmpeg] +--- + +To cut video with ffmpeg, use the flag `-ss` for the beginning of the cut and +`-to` for the end of the cut. For example: + +```sh +ffmpeg -i in.mp4 -ss 00:00:02 -to 00:00:14 out.mp4 +``` diff --git a/content/sw-notes/ffmpeg-remove-audio.md b/content/sw-notes/ffmpeg-remove-audio.md new file mode 100644 index 0000000..f4c33f9 --- /dev/null +++ b/content/sw-notes/ffmpeg-remove-audio.md @@ -0,0 +1,9 @@ +--- +title: "How to remove audio from videos with ffmpeg" +date: 2024-04-24 +translationKey: ffmpeg-remove-audio +categories: [software, guide] +tags: [ffmpeg] +--- + +To remove audio from video, pass `-an` flag to the command. diff --git a/content/sw-notes/insert-unicode.md b/content/sw-notes/insert-unicode.md new file mode 100644 index 0000000..c897fc3 --- /dev/null +++ b/content/sw-notes/insert-unicode.md @@ -0,0 +1,16 @@ +--- +title: "How to insert unicode in vim" +date: 2022-02-20 +lang: en +categories: [software, guide] +tags: [vim, how-to, unicode] +translationKey: "vim-insert-unicode" +--- + +Today I learned how to insert unicode in Vim. It's simple: + +In insert mode, type Ctrl+V, then type u, then type the +hex unicode. + +You can also type character like escape (shown as `^[`) or carriage return +(shown as `^M`) by typing Esc or Enter respectively. diff --git a/content/sw-notes/json-output-format.fr.md b/content/sw-notes/json-output-format.fr.md new file mode 100644 index 0000000..798f0c9 --- /dev/null +++ b/content/sw-notes/json-output-format.fr.md @@ -0,0 +1,13 @@ +--- +title: "Comment imprinter du JSON avec des couleurs avec jq" +date: 2021-04-27T17:06:51+07:00 +translationKey: json-output-format +categories: [software, guide] +tags: [jq, less, bash, cli, json] +--- + +On peut formatter du JSON avec des couleurs avec `jq` et le lire avec `less`: + +```bash + | jq -C | less -r +``` diff --git a/content/sw-notes/json-output-format.md b/content/sw-notes/json-output-format.md new file mode 100644 index 0000000..e22cfbf --- /dev/null +++ b/content/sw-notes/json-output-format.md @@ -0,0 +1,16 @@ +--- +title: "Formatting JSON Output with jq" +date: 2021-04-27T17:06:51+07:00 +translationKey: json-output-format +categories: [software, guide] +tags: [bash, cli, json, jq, less] +--- + +TIL: Syntax-highlighted JSON output + +If you have some command that return (long) JSON, you can view it formatted +with color with: + +```bash + | jq -C | less -r +``` diff --git a/content/sw-notes/keepassxc-enable-desktop-integration.md b/content/sw-notes/keepassxc-enable-desktop-integration.md new file mode 100644 index 0000000..01dc532 --- /dev/null +++ b/content/sw-notes/keepassxc-enable-desktop-integration.md @@ -0,0 +1,10 @@ +--- +title: "KeepassXC: how to enable desktop integration" +date: 2024-04-24 +translationKey: keepassxc-desktop-integration +categories: [software, guide] +tags: [keepassxc] +--- + +Go to Setting > Secret Service Integration > Enable KeepassXC Freedesktop.org +Secret Service integration. diff --git a/content/sw-notes/nheko-plain-creds.md b/content/sw-notes/nheko-plain-creds.md new file mode 100644 index 0000000..da331bd --- /dev/null +++ b/content/sw-notes/nheko-plain-creds.md @@ -0,0 +1,18 @@ +--- +title: "Storing nheko credentials as plain text" +date: 2024-04-24 +translationKey: nheko-plain-creds +categories: [software, guide] +tags: [nheko] +--- + +nheko requires a keyring (like GNOME keyring or keypassxc) to store encrypted +password, which doesn't necessarily work, or probably you just don't want to +use them, in which case you'd want to disable that. + +To do this, edit `.config/nheko/nheko.conf` and add the config: + +```ini +[General] +run_without_secure_secrets_service=true +``` diff --git a/content/sw-notes/regex-unicode.md b/content/sw-notes/regex-unicode.md new file mode 100644 index 0000000..97c28b8 --- /dev/null +++ b/content/sw-notes/regex-unicode.md @@ -0,0 +1,15 @@ +--- +title: "How to match Unicode in RegEx" +date: 2022-02-13T16:32:53+07:00 +translationKey: regex-unicode +categories: [software, guide] +tags: [regex, "regular expression", unicode] +--- + +Today I learned how to match [unicode in RegEx][regex-unicode]. + +For example, unicode-encoded letters (that is, any letters from any language) +can be matched with `\p{L}`. View [an example on RegEx 101][example] + +[regex-unicode]: https://www.regular-expressions.info/unicode.html +[example]: https://regex101.com/r/N602FX/1 diff --git a/content/sw-notes/socks-proxy.md b/content/sw-notes/socks-proxy.md new file mode 100644 index 0000000..c1accf0 --- /dev/null +++ b/content/sw-notes/socks-proxy.md @@ -0,0 +1,34 @@ +--- +title: "SOCKS Proxy via SSH" +date: 2023-06-05 +lang: en +categories: [software, guide] +tags: [tips, guide, "SOCKS proxy"] +translationKey: "socks-proxy" +--- + +[SOCKS (RFC 1928)][socks] is a protocol that can be, as said in the +RFC itself, used for firewall traversal, or some other types of network +blocking. + +If you have a remote server that you can SSH to, setting up a +SOCKS connection is dead simple: + +```sh +ssh -D [port] [host] +``` + +where `[host]` is the host name you specified in the SSH config +file. + +How to get your software to direct its connection through this proxy depends on +the program. For example, in Firefox, you have to go to the setting and set it +in the network settings---use your server's address and the port you used +earlier. In Chromium and similar forks, add +`--proxy-server="socks5://host:port"` to the parameter in the command line. +Read more on the instruction for [Firefox][guide-fox] and +[Chromium][guide-chrom] on their respective websites. + +[socks]: https://www.rfc-editor.org/rfc/rfc1928 +[guide-fox]: https://support.mozilla.org/en-US/kb/connection-settings-firefox +[guide-chrom]: https://www.chromium.org/developers/design-documents/network-stack/socks-proxy/ diff --git a/content/sw-notes/vim-jp.fr.md b/content/sw-notes/vim-jp.fr.md new file mode 100644 index 0000000..d48aa79 --- /dev/null +++ b/content/sw-notes/vim-jp.fr.md @@ -0,0 +1,15 @@ +--- +title: "Écrire le japonais avec vim" +date: 2021-04-19T17:58:51+07:00 +translationKey: vim-jp +categories: [software, guide] +tags: [vim, japanese, useless, hiragana, katakana] +--- + +On peut écrire du Hiragana and Katakana avec vim: +Appuyer Ctrl+K puis écrire le nom du glyph en Romanji: + +- Hiragana: ^Kna → な +- Katakana: ^KNa → ナ + +Les autres caractères: diff --git a/content/sw-notes/vim-jp.md b/content/sw-notes/vim-jp.md new file mode 100644 index 0000000..54b3959 --- /dev/null +++ b/content/sw-notes/vim-jp.md @@ -0,0 +1,15 @@ +--- +title: "You can type Hiragana and Katakana on vim" +date: 2021-04-19T17:58:51+07:00 +translationKey: vim-jp +categories: [software, guide] +tags: [vim, japanese, useless, hiragana, katakana] +--- + +You can type Hiragana and Katakana on vim: +Type Ctrl+K then type the glyph name in Romanji + +- Hiragana: ^Kna → な +- Katakana: ^KNa → ナ + +Full list: diff --git a/content/sw-notes/vim-paste-command.md b/content/sw-notes/vim-paste-command.md new file mode 100644 index 0000000..841d4be --- /dev/null +++ b/content/sw-notes/vim-paste-command.md @@ -0,0 +1,11 @@ +--- +title: "Paste command output into vim" +date: 2024-04-24 +translationKey: vim-paste-command +categories: [software, guide] +tags: [vim] +--- + +To paste the command output into vim, type `:r!`. +For example, to paste current date in ISO 8601 into vim, I can type: +`r!date -I`. diff --git a/content/sw-notes/vim-paste-file.md b/content/sw-notes/vim-paste-file.md new file mode 100644 index 0000000..5d4bbd1 --- /dev/null +++ b/content/sw-notes/vim-paste-file.md @@ -0,0 +1,9 @@ +--- +title: "TIL: Paste filename in vim" +date: 2021-04-27T23:12:29+07:00 +translationKey: vim-paste-file +categories: [software, guide] +tags: [vim] +--- + +To paste the current file's name into itself, type Ctrl+R then %. diff --git a/content/til/_index.fr.md b/content/til/_index.fr.md deleted file mode 100644 index c331bf2..0000000 --- a/content/til/_index.fr.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: AJA -translationKey: til ---- - -(*Aujourd'hui J'ai Appris...* -- traduit de *Today I learned* en anglais. -100 points d'Internet pour ce qui peut me donner une meilleur traduction.) - -Voici les choses duquel j'apprends tous les jours. diff --git a/content/til/_index.md b/content/til/_index.md deleted file mode 100644 index 8808ccd..0000000 --- a/content/til/_index.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: TIL -lang: en -translationKey: til ---- - -These are lists of small tricks or fun trivia I learned. diff --git a/content/til/css-exfil.md b/content/til/css-exfil.md deleted file mode 100644 index 8cb09a4..0000000 --- a/content/til/css-exfil.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "TIL: CSS can steal your data" -date: 2021-02-06T23:06:51+07:00 -translationKey: css-exfil -tags: [css, exfil, vulnerability, security] ---- - -The vulnerability is called [CSS Exfil][exfil]. - -[exfil]: https://www.mike-gualtieri.com/posts/stealing-data-with-css-attack-and-defense diff --git a/content/til/default_light.png b/content/til/default_light.png deleted file mode 100644 index bfe18fc..0000000 Binary files a/content/til/default_light.png and /dev/null differ diff --git a/content/til/devtool-theme.md b/content/til/devtool-theme.md deleted file mode 100644 index 25d6d77..0000000 --- a/content/til/devtool-theme.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -categories: [til] -title: "TIL: Devtool allows you to emulate system theme" -date: 2021-05-03T11:15:35+07:00 -tag: [css, theme] ---- - -Today I learned Firefox's devtool provides you with a tool to emulate -dark/light mode (probably Chrome does, too). It can be useful for front-end -developers when they want to design a system-based theme switch. - -![My default theme, light theme](/til/default_light.png) -![After choosing dark mode emulation](/til/emulate_dark.png) diff --git a/content/til/emulate_dark.png b/content/til/emulate_dark.png deleted file mode 100644 index a45fa1c..0000000 Binary files a/content/til/emulate_dark.png and /dev/null differ diff --git a/content/til/insert-unicode.md b/content/til/insert-unicode.md deleted file mode 100644 index 0fd6b28..0000000 --- a/content/til/insert-unicode.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: "TIL How to insert unicode in vim" -date: 2022-02-20 -lang: en -categories: [ til ] -tags: [vim, how-to, unicode] -translationKey: "vim-insert-unicode" ---- - -Today I learned how to insert unicode in Vim. It's simple: - -In insert mode, type Ctrl+V, then type u, then type the -hex unicode. - -You can also type character like escape (shown as `^[`) or carriage return -(shown as `^M`) by typing Esc or Enter respectively. diff --git a/content/til/json-output-format.fr.md b/content/til/json-output-format.fr.md deleted file mode 100644 index ae77803..0000000 --- a/content/til/json-output-format.fr.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "AJA comment imprinter du JSON avec des couleurs" -date: 2021-04-27T17:06:51+07:00 -translationKey: json-output-format -tags: [bash, cli, json, trick] ---- - -On peut formatter du JSON avec des couleurs avec `jq` et le lire avec `less`: - -```bash - | jq -C | less -r -``` diff --git a/content/til/json-output-format.md b/content/til/json-output-format.md deleted file mode 100644 index 5bbc153..0000000 --- a/content/til/json-output-format.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "TIL: Formatting JSON Output" -date: 2021-04-27T17:06:51+07:00 -translationKey: json-output-format -tags: [bash, cli, json, trick] ---- - -TIL: Syntax-highlighted JSON output - -If you have some command that return (long) JSON, you can view it formatted -with color with: - -```bash - | jq -C | less -r -``` diff --git a/content/til/regex-unicode.md b/content/til/regex-unicode.md deleted file mode 100644 index f2c7b94..0000000 --- a/content/til/regex-unicode.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "TIL How to match Unicode in RegEx" -date: 2022-02-13T16:32:53+07:00 -translationKey: regex-unicode -tags: [regex, "regular expression", unicode] ---- - -Today I learned how to match [unicode in RegEx][regex-unicode]. - -For example, unicode-encoded letters (that is, any letters from any language) -can be matched with `\p{L}`. View [an example on RegEx 101][example] - -[regex-unicode]: https://www.regular-expressions.info/unicode.html -[example]: https://regex101.com/r/N602FX/1 diff --git a/content/til/vim-jp.fr.md b/content/til/vim-jp.fr.md deleted file mode 100644 index ed86d0f..0000000 --- a/content/til/vim-jp.fr.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "AJA que on peut écrire le japonais avec vim" -date: 2021-04-19T17:58:51+07:00 -translationKey: vim-jp -tags: [vim, japanese, useless, hiragana, katakana] ---- - -On peut écrire du Hiragana and Katakana avec vim: -Appuyer Ctrl+K puis écrire le nom du glyph en Romanji: - -- Hiragana: ^Kna → な -- Katakana: ^KNa → ナ - -Les autres caractères: diff --git a/content/til/vim-jp.md b/content/til/vim-jp.md deleted file mode 100644 index 5592824..0000000 --- a/content/til/vim-jp.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "TIL: You can type Hiragana and Katakana on vim" -date: 2021-04-19T17:58:51+07:00 -translationKey: vim-jp -tags: [vim, japanese, useless, hiragana, katakana] ---- - -You can type Hiragana and Katakana on vim: -Type Ctrl+K then type the glyph name in Romanji - -- Hiragana: ^Kna → な -- Katakana: ^KNa → ナ - -Full list: diff --git a/content/til/vim-paste-file.md b/content/til/vim-paste-file.md deleted file mode 100644 index 712085e..0000000 --- a/content/til/vim-paste-file.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "TIL: Paste filename in vim" -date: 2021-04-27T23:12:29+07:00 -translationKey: vim-paste-file -tags: [vim, trick] ---- - -To paste the current file's name into itself, type Ctrl+R then %. diff --git a/static/images/default_light.png b/static/images/default_light.png new file mode 100644 index 0000000..bfe18fc Binary files /dev/null and b/static/images/default_light.png differ diff --git a/static/images/emulate_dark.png b/static/images/emulate_dark.png new file mode 100644 index 0000000..a45fa1c Binary files /dev/null and b/static/images/emulate_dark.png differ -- cgit 1.4.1