Todo

versatile #

nixvim 是个好方法,helix 也可以这样子。

https://doc.rust-lang.org/error_codes/E0038.html https://mp.weixin.qq.com/s/OM8xhIFB3m95T1GCAQm1Ow https://vonng.com/cn/blog/db/pg-in-2024/ https://google.github.io/comprehensive-rust/ https://www.youtube.com/watch?v=C8YtdC8mxTU https://www.whexy.com/posts/func-color https://github.com/kumakichi/easy_rust_chs

并发 #

https://marabos.nl/atomics/ https://atomics.rs/basics.html#refcell https://rustcc.github.io/Rust_Atomics_and_Locks/1_Basic_of_Rust_Concurrency.html#%E5%86%85%E9%83%A8%E5%8F%AF%E5%8F%98%E6%80%A7 https://github.com/smallnest/concurrency-programming-via-rust

log #

https://github.com/estk/log4rs/tree/main configure logging https://rust-lang-nursery.github.io/rust-cookbook/development_tools/debugging/config_log.html

RwLock hashmap #

Rust RwLock cache: https://gist.github.com/jpastuszek/80ed6a8929ec93259c51f5ee94a6e8ec https://www.lurklurk.org/effective-rust/deadlock.html

https://www.reddit.com/r/rust/comments/175anmh/shared_state_whats_the_better_approach_an/ https://users.rust-lang.org/t/how-to-insert-into-hashmap-from-multiple-threads-at-the-same-time/90559/2

reading #

Cloudflare DNS

https://notebooklm.google.com/ http://paulgraham.com/greatwork.html

https://github.com/jcleng/nixos-configuration/blob/master/configuration.nix https://nixos-and-flakes.thiscute.world/zh/nixos-with-flakes/get-started-with-nixos https://github.com/ryan4yin/nix-config/tree/main https://thiscute.world/posts/nixos-and-flake-basics/ https://lantian.pub/article/modify-website/nixos-initial-config-flake-deploy.lantian/ https://nix-community.github.io/home-manager/index.xhtml https://source.mcwhirter.io/craige/mio-ops https://github.com/hervyqa/dotfire/blob/main/services/xserver/default.nix

k8s sidecar #

https://labs.iximiuz.com/tutorials/kubernetes-native-sidecars

mobile services 测试问题 #

create database test_postgres; 并 restore。

运行 python manage.py test -k -v 3 -d

错误: psycopg2.errors.DuplicateTable: relation "django_content_type" already exists

django/core/management/commands/migrate.py 需要 fake_initial=True

执行 runner

runner 默认是 DiscoverRunner

更具体的细节需要进一步研究。

git fs #

explore the ideas and more git commands: src

pg_stat_monitor and pmm #

https://docs.percona.com/postgresql/15/docker.html# https://www.percona.com/blog/monitoring-postgresql-databases-using-percona-monitoring-management/

vscode cli #

Download page: https://code.visualstudio.com/download

cli download link:

It’s a tarball, including only the binary.

To run code web server:

code serve-web --without-connection-token --host 0.0.0.0 --port 8000 --verbose --log debug

rust #

helix python config #

[[language]]
name = "python"
scope = "source.python"
injection-regex = "python"
file-types = ["py","pyi","py3","pyw",".pythonstartup",".pythonrc"]
shebangs = ["python"]
roots = [".", "pyproject.toml", "pyrightconfig.json"]
comment-token = "#"
language-servers = ["pyright", "ruff"]
indent = { tab-width = 4, unit = "    " }
auto-format = true

[language.formatter]
command = "black"
args = [
  "-",
  "--quiet",
  "--line-length=88"
]

[language-server.pyright]
command = "pyright-langserver"
args = ["--stdio"]

[language-server.pyright.config]
reportMissingTypeStubs = false

[language-server.pyright.config.python.analysis]
typeCheckingMode = "basic"
autoImportCompletions = true

[language-server.ruff]
command = "ruff-lsp"

[language-server.ruff.config]
settings = {args = []}
  • Helix WASM

https://github.com/helix-editor/helix/discussions/8588 https://github.com/makemeunsee/helix/tree/wasm32/helix-web

  • headless cms

https://jamstack.org/headless-cms/

could be api driven or git based

https://decapcms.org/ https://wagtail.org/

出发点是,zola 这样的能用动态的内容么?Someone [worked on that][https://github.com/getzola/zola/issues/401] and succeeded.

应该的方向是用 templates

Alt text credit

try following:

atuin-setup() {
    if ! which atuin &> /dev/null; then return 1; fi
    bindkey '^E' _atuin_search_widget

    export ATUIN_NOBIND="true"
    eval "$(atuin init "$CUR_SHELL")"
    fzf-atuin-history-widget() {
        local selected num
        setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2>/dev/null

        # local atuin_opts="--cmd-only --limit ${ATUIN_LIMIT:-5000}"
        local atuin_opts="--cmd-only"
        local fzf_opts=(
            --height=${FZF_TMUX_HEIGHT:-80%}
            --tac
            "-n2..,.."
            --tiebreak=index
            "--query=${LBUFFER}"
            "+m"
            "--bind=ctrl-d:reload(atuin search $atuin_opts -c $PWD),ctrl-r:reload(atuin search $atuin_opts)"
        )

        selected=$(
            eval "atuin search ${atuin_opts}" |
                fzf "${fzf_opts[@]}"
        )
        local ret=$?
        if [ -n "$selected" ]; then
            # the += lets it insert at current pos instead of replacing
            LBUFFER+="${selected}"
        fi
        zle reset-prompt
        return $ret
    }
    zle -N fzf-atuin-history-widget
    bindkey '^R' fzf-atuin-history-widget
}
atuin-setup

2023-11-08 #

old #