Welcome to my page! Feel free to share the contents if you think they are useful. Buy me a ☕ if you want to appreciate my posts :)
Setup Modern Python development
First, you need to install pyenv so you can have multiple version of python in your system. then for projects that does not need packaging, you can use pyenv-virtualenv to setup requirements.txt for project based venv. Second, you need to install pipx, so it installs some shared tools for the whole system. After setting up pipx (using certain version of python specified by pyenv), pipx reuses the python interpreter on which pipx was installed, so if you upgrade python and got the previous one removed, pipx will fail....
Migrating to new python version with lots of dependencies
so i am using poetry to manage my venv for a project that relies on dozens of PYPI packages. i first thought it would be relatively easy to migrate python3.7 to the latest 3.10. but i was wrong, and i spent hours to fix it. Here is what i’ve learned. first of all, you need to install pyenv for multiple version management, a caveat here is that if you use the suggested method to setup (through curl https://pyenv....
Emacs in WSL2
Using Emacs on windows is always an imperfect experience, luckly windows10 comes with WSL2 now, which lets you install Emacs in WSL2 and use it on windows now. I did some hacking to make the experience little bit better, which includes: open any file on windows in emacs@wsl2 setup org-capture on chrome on windows and capture notes using emacs@wsl2 open links in org-mode in emacs@wsl2 using windows default apps. e.g., open https links using chrome on windows, open document links in MS-office on windows, etc....
setup hugo with github pages on github
I followed this site for setting up hugo blogging on https://github.com/ using github.io, the instruction is little bit confusion, so just to clarify a little bit here. the instructions there uses gh-pages branch to publish your site, this is done by the action peaceiris/actions-gh-pages@v3. however, for user/organization.github.io pages, the default branch for publishing is main. so if you use this action, you need to change your page branch to gh-pages and set the directory to /root....
setup emacs foc C++ with ccls and lsp
So ccls is a lsp wrapper for clang it works as a backend that indexes source code and gives emacs index information for better navigation and refactoring of c++ I have had a few issues with the tool’s setup in emacs enviroment. and found the following things that may need extra attention .ccls file, this file basically does two things tell ccls how to index the file using clang before index the file tell clang how to compile and interpret the code as there is a mixture of options for ccls and arguments for clang, need to pay extra attention usually lines in ....