diff options
Diffstat (limited to 'content/notes')
| -rw-r--r-- | content/notes/_index.md | 8 | ||||
| -rw-r--r-- | content/notes/devtool-theme.md | 13 | ||||
| -rw-r--r-- | content/notes/ffmpeg-cut-video.md | 13 | ||||
| -rw-r--r-- | content/notes/ffmpeg-remove-audio.md | 8 | ||||
| -rw-r--r-- | content/notes/insert-unicode.md | 15 | ||||
| -rw-r--r-- | content/notes/json-output-format.md | 15 | ||||
| -rw-r--r-- | content/notes/keepassxc-enable-desktop-integration.md | 9 | ||||
| -rw-r--r-- | content/notes/nheko-plain-creds.md | 17 | ||||
| -rw-r--r-- | content/notes/regex-unicode.md | 14 | ||||
| -rw-r--r-- | content/notes/socks-proxy.md | 32 | ||||
| -rw-r--r-- | content/notes/vim-jp.md | 14 | ||||
| -rw-r--r-- | content/notes/vim-paste-command.md | 10 | ||||
| -rw-r--r-- | content/notes/vim-paste-file.md | 8 |
13 files changed, 176 insertions, 0 deletions
diff --git a/content/notes/_index.md b/content/notes/_index.md new file mode 100644 index 0000000..13c4509 --- /dev/null +++ b/content/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/notes/devtool-theme.md b/content/notes/devtool-theme.md new file mode 100644 index 0000000..664ec90 --- /dev/null +++ b/content/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. + + + diff --git a/content/notes/ffmpeg-cut-video.md b/content/notes/ffmpeg-cut-video.md new file mode 100644 index 0000000..f4934cf --- /dev/null +++ b/content/notes/ffmpeg-cut-video.md @@ -0,0 +1,13 @@ ++++ +title = "How to cut videos with ffmpeg" +date = 2024-04-24 +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/notes/ffmpeg-remove-audio.md b/content/notes/ffmpeg-remove-audio.md new file mode 100644 index 0000000..d730e86 --- /dev/null +++ b/content/notes/ffmpeg-remove-audio.md @@ -0,0 +1,8 @@ ++++ +title = "How to remove audio from videos with ffmpeg" +date = 2024-04-24 +categories = ["software", "guide"] +tags = ["ffmpeg"] ++++ + +To remove audio from video, pass `-an` flag to the command. diff --git a/content/notes/insert-unicode.md b/content/notes/insert-unicode.md new file mode 100644 index 0000000..9bfb7bb --- /dev/null +++ b/content/notes/insert-unicode.md @@ -0,0 +1,15 @@ ++++ +title = "How to insert unicode in vim" +date = 2022-02-20 +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 <kbd>Ctrl+V</kbd>, then type <kbd>u</kbd>, then type the +hex unicode. + +You can also type character like escape (shown as `^[`) or carriage return +(shown as `^M`) by typing <kbd>Esc</kbd> or <kbd>Enter</kbd> respectively. diff --git a/content/notes/json-output-format.md b/content/notes/json-output-format.md new file mode 100644 index 0000000..3d98305 --- /dev/null +++ b/content/notes/json-output-format.md @@ -0,0 +1,15 @@ ++++ +title = "Formatting JSON Output with jq" +date = 2021-04-27T17:06:51+07:00 +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 +<command> | jq -C | less -r +``` diff --git a/content/notes/keepassxc-enable-desktop-integration.md b/content/notes/keepassxc-enable-desktop-integration.md new file mode 100644 index 0000000..c791719 --- /dev/null +++ b/content/notes/keepassxc-enable-desktop-integration.md @@ -0,0 +1,9 @@ ++++ +title = "KeepassXC: how to enable desktop integration" +date = 2024-04-24 +categories = ["software", "guide"] +tags = ["keepassxc"] ++++ + +Go to Setting > Secret Service Integration > Enable KeepassXC Freedesktop.org +Secret Service integration. diff --git a/content/notes/nheko-plain-creds.md b/content/notes/nheko-plain-creds.md new file mode 100644 index 0000000..cc8983d --- /dev/null +++ b/content/notes/nheko-plain-creds.md @@ -0,0 +1,17 @@ ++++ +title = "Storing nheko credentials as plain text" +date = 2024-04-24 +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/notes/regex-unicode.md b/content/notes/regex-unicode.md new file mode 100644 index 0000000..b57e969 --- /dev/null +++ b/content/notes/regex-unicode.md @@ -0,0 +1,14 @@ ++++ +title = "How to match Unicode in RegEx" +date = 2022-02-13T16:32:53+07:00 +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/notes/socks-proxy.md b/content/notes/socks-proxy.md new file mode 100644 index 0000000..b97066b --- /dev/null +++ b/content/notes/socks-proxy.md @@ -0,0 +1,32 @@ ++++ +title = "SOCKS Proxy via SSH" +date = 2023-06-05 +categories = ["software", "guide"] +tags = ["tips", "guide", "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 <abbr>SSH</abbr> to, setting up a +SOCKS connection is dead simple: + +```sh +ssh -D [port] [host] +``` + +where `[host]` is the host name you specified in the <abbr>SSH</abbr> 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/notes/vim-jp.md b/content/notes/vim-jp.md new file mode 100644 index 0000000..e706a33 --- /dev/null +++ b/content/notes/vim-jp.md @@ -0,0 +1,14 @@ ++++ +title = "You can type Hiragana and Katakana on vim" +date = 2021-04-19T17:58:51+07:00 +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: <http://vimdoc.sourceforge.net/htmldoc/digraph.html#digraph-table> diff --git a/content/notes/vim-paste-command.md b/content/notes/vim-paste-command.md new file mode 100644 index 0000000..d1da45f --- /dev/null +++ b/content/notes/vim-paste-command.md @@ -0,0 +1,10 @@ ++++ +title = "Paste command output into vim" +date = 2024-04-24 +categories = ["software", "guide"] +tags = ["vim"] ++++ + +To paste the command output into vim, type `:r!<command>`. +For example, to paste current date in ISO 8601 into vim, I can type: +`r!date -I`. diff --git a/content/notes/vim-paste-file.md b/content/notes/vim-paste-file.md new file mode 100644 index 0000000..f6d6ad2 --- /dev/null +++ b/content/notes/vim-paste-file.md @@ -0,0 +1,8 @@ ++++ +title = "TIL: Paste filename in vim" +date = 2021-04-27T23:12:29+07:00 +categories = ["software", "guide"] +tags = ["vim"] ++++ + +To paste the current file's name into itself, type Ctrl+R then %. |
