Odoo Hide Column in Tree

<field name="line_ids"> <tree> <field name="date_register" attrs="{'column_invisible':[('parent.field_in_parent_record', '=', True)]}"/> </tree> </field>

22/07/25 · 1 min · 10 words · me

Grep Before After

grep --context 3 "search_pattern" path/to/file grep --before-context 3 "search_pattern" path/to/file grep --after-context 3 "search_pattern" path/to/file grep -C 3 "search_pattern" path/to/file grep -A 3 "search_pattern" path/to/file grep -B 3 "search_pattern" path/to/file

22/07/25 · 1 min · 30 words · me

Git Config

Global location store is ~/.gitconfig git config --global key value Local location store is .git/config git config --local key value

15/07/25 · 1 min · 20 words · me

Rsync

Alternative cp command [dry run] rsync -hav --progress source dest --dry-run Alternative cp command rsync -hav --progress source dest

15/07/25 · 1 min · 19 words · me

Ventoy in Nixos

Error ventoy currently error when using nixos version 25 solution just export enviroment variable and append –impure to the last command script export NIXPKGS_ALLOW_INSECURE=1 nix run .#huy --impure

13/07/25 · 1 min · 28 words · me

Chezmoi

how to using chezmoi only one command chezmoi init --apply GITHUB_REPO example chezmoi init --apply git@github.com:nguyenhuy158/chezmoi

13/07/25 · 1 min · 16 words · me

Git Branch

Create branch git checkout -b branch_name Delete branch git checkout other_branch git branch -D branch_name git push origin --delete branch_name

11/07/25 · 1 min · 20 words · me

One Day One Life

Một ngày của bạn trôi qua như thế nào thì một đời bạn cũng sẽ trôi qua như thế đấy. Chúng ta hận đời rồi quay lại mắng người thân.

10/07/25 · 1 min · 30 words · me

Shell Env

Use /usr/bin/env in Shell Scripts When writing shell scripts, avoid hardcoding the full path to the shell. Instead, use the environment path to make your script more portable across different systems. ✅ Recommended: #!/usr/bin/env bash 🚫 Not recommended: #!/usr/bin/bash Using env ensures the system uses the correct version of the shell from the user’s environment.

08/07/25 · 1 min · 55 words · me

Convert Html to Markdown

In some situations, such as: You are getting HTML content from email or the web Want to paste it into Slack neatly Or want to paste it into Hugo to write a blog without format errors Then Markdown is the best standard. But converting by hand is tiring. So… 🛠 Solution: Use Python to convert HTML → Markdown There are 2 extremely convenient libraries: 1. html2text — easy to use, install and you’re ready to go pip install html2text import html2text html = "<b>Hello</b> <a href='https://example.com'>Click me</a>" markdown = html2text.html2text(html) print(markdown) # **Hello** [Click me](https://example.com) markdownify — more advanced, highly customizable pip install markdownify from markdownify import markdownify as md html = "<h1>Title</h1><p>This is <b>bold</b></p>" markdown = md(html) print(markdown) # # Title # This is **bold** ✨ Why use it? Slack does not support HTML ⇒ Markdown is needed Hugo also uses Markdown to write articles Work faster, less manual editing ...

04/07/25 · 1 min · 165 words · me