I just shared some ssh keys with myself and ran into this error telling me that
I did not set the correct permissions on my key.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0750 for '/home/waylon/.ssh/id_*******' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/home/waylon/.ssh/id_*******": bad Permissions
repo: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I changed them with the following commands.
chmod 644 ~/.ssh/id_*******.pub
chmod 600 ~/.ssh/id_*******
Publishing rhythm
from kedro.pipeline import node
node(
input="raw",
output="int",
func=my_func,
tags=["one"],
)
Mr-Destructive [1] has done a fantastic job with djankata [2]. Highly recommend taking a look.
Django + Markata blog starter
References:
[1]: https://github.com/Mr-Destructive
[2]: https://github.com/Mr-Destructive/djankata
Check out nvim [1] by Allaman [2]. It’s a well-crafted project with great potential.
Minimal, blazingly fast, and pure Lua based Neovim configuration for my work as DevOps/Cloud Engineer with batteries included for Python, Golang, and, of course, YAML
References:
[1]: https://github.com/Allaman/nvim
[2]: https://github.com/Allaman
Looking for inspiration? dotfiles [1] by jessarcher [2].
$HOME sweet $HOME
References:
[1]: https://github.com/jessarcher/dotfiles
[2]: https://github.com/jessarcher
With the latest release of version of nvim 0.8.0 we get access to a new winbar
feature. One thing I have long wanted somewhere in my nvim is navigation for
pairing partners or anyone watching can keep track of where I am. As the
driver it’s easy to keep track of the file/function you are in. But when you
make big jumps in a few keystrokes it can be quite disorienting to anyone
watching, and having this feedback to look at is very helpful.
[1]
winbar # [2]
nvim exposes the winbar api in lua, and you can send any text to the winbar as follows.
vim.o.winbar = "here"
You can try it for yourself right from the nvim command line.
:lua vim.o.winbar = "here"
Now you will notice one line above your file with the word here at the very
beginning.
Clearing the winbar # [3]
If you want to clear it out, you can just set it to an empty string or nil.
:lua vim.o.winbar = ""
:lua vim.o.winbar = nil
Setting up nvim-navic # [4]
You will need to install nvim-navic if you want to use it. I added it to my
plugins using Plug as follows.
call plug#begin('~/.local/share/nvim/plugged')
Plug 'SmiteshP/nvim-navic'
call plug#end()
Note! nvim-navic does require the use of the nvim lsp, so if you ...
Just starred nvim-navic [1] by SmiteshP [2]. It’s an exciting project with a lot to offer.
Simple winbar/statusline plugin that shows your current code context
References:
[1]: https://github.com/SmiteshP/nvim-navic
[2]: https://github.com/SmiteshP
I came across winbar.nvim [1] from fgheng [2], and it’s packed with great features and ideas.
winbar config for neovim
References:
[1]: https://github.com/fgheng/winbar.nvim
[2]: https://github.com/fgheng
Looking for inspiration? nvim-scrollbar [1] by petertriho [2].
Extensible Neovim Scrollbar
References:
[1]: https://github.com/petertriho/nvim-scrollbar
[2]: https://github.com/petertriho
Looking for inspiration? nvim-hlslens [1] by kevinhwang91 [2].
Hlsearch Lens for Neovim
References:
[1]: https://github.com/kevinhwang91/nvim-hlslens
[2]: https://github.com/kevinhwang91
I came across pre-commit [1] from pre-commit [2], and it’s packed with great features and ideas.
A framework for managing and maintaining multi-language pre-commit hooks.
References:
[1]: https://github.com/pre-commit/pre-commit
[2]: https://github.com/pre-commit
I really like having global cli command installed with pipx. Since textual
0.2.x (the css release) is out I want to be able to pop into textual devtools
easily from anywhere.
[1]
Pipx Install # [2]
You can pipx install textual.
pipx install textual
But if you try to run any textual cli commands you will run into a
ModuleNotFoundError, because you need to install the optional dev
dependencies.
Traceback (most recent call last):
File "/home/u_walkews/.local/bin/textual", line 5, in <module>
from textual.cli.cli import run
File "/home/u_walkews/.local/pipx/venvs/textual/lib/python3.10/site-packages/textual/cli/cli.py", line 4, in <module>
import click
ModuleNotFoundError: No module named 'click'
Pipx Inject # [3]
In order to install optional dependencies with pipx you need to first install
the library, then inject in the optional dependencies using the square bracket
syntax.
pipx install textual
pipx inject textual 'textual[dev]'
References:
[1]: https://stable-diffusion.waylonwalker.com/000359.2404332231.webp
[2]: #pipx-install
[3]: #pipx-inject
I am working through the textual tutorial, and I want to put it in a proper cli
that I can pip install and run the command without textual run --dev app.py.
This is a fine pattern, but I also want this to work when I don’t have a file
to run.
[1]
pyproject.toml entrypoints # [2]
I set up a new project running hatch new, and added the following entrypoint,
giving me a tutorial cli command to run.
...
[project.scripts]
tutorial = 'textual_tutorial.tui:tui'
https://waylonwalker.com/hatch-new-cli/
setup.py entrypoints # [3]
If you are using setup.py, you can set up entrypoints in the setup command.
from setuptools import setup
setup(
...
entry_points={
"console_scripts": ["tutorial = textual_tutorial.tui:tui"],
},
...
)
https://waylonwalker.com/minimal-python-package/
tui.py # [4]
adding features
Now to get devtools through a cli without running through textual run --dev.
I pulled open the textual cli source code, and this is what it does at the time
of writing.
Note: I used sys.argv as a way to implement a --dev quickly tutorial. For a
real project, I’d setup argparse, click, or typer. typer is my go to these
days, unless I am really trying to limit dependencies,...
I like AnH0ang’s [1] project kedro-aim [2].
A kedro plugin that enables logging to the ml experiment tracker aim
References:
[1]: https://github.com/AnH0ang
[2]: https://github.com/AnH0ang/kedro-aim
- 11ty https://www.rockyourcode.com/how-to-deploy-eleventy-to-github-pages-with-github-actions/
- hugo puts it in the base url https://gohugo.io/getting-started/configuration/#baseurl
- mkdocs uses a special cli build command https://squidfunk.github.io/mkdocs-material/publishing-your-site/#github-pages
The work on PrismLauncher [1] by PrismLauncher [2].
A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once (Fork of MultiMC)
References:
[1]: https://github.com/PrismLauncher/PrismLauncher
[2]: https://github.com/PrismLauncher
I’m really excited about learn-cloudformation [1], an amazing project by widdix [2]. It’s worth exploring!
Learn how to use Infrastructure as Code on AWS with the help of CloudFormation.
References:
[1]: https://github.com/widdix/learn-cloudformation
[2]: https://github.com/widdix
For far too long I have had to fidget with v4l2oloopback after reboot. I’ve
had this happen on ubuntu 18.04, 22.04, and arch.
After a reboot the start virtual camera button won’t work, It appears and is
clickable, but never turns on. Until I run this command.
sudo modprobe v4l2loopback video_nr=10 card_label="OBS Video Source" exclusive_caps=1
[1]
Today I learned that you can turn on kernel modules through some files in /etc/modules...
This is what I did to my arch system to get it to work right after boot.
echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf
echo "options v4l2loopback video_nr=10 card_label=\"OBS Video Source\" exclusive_caps=1" | sudo tee /etc/modprobe.d/v4l2loopback.conf
References:
[1]: https://stable-diffusion.waylonwalker.com/000378.373882614.webp
Upon first running an aws cli command using localstack you might end up with the following error.
Unable to locate credentials. You can configure credentials by running "aws configure".
Easy way # [1]
The easy easiest way is to leverage a package called awscli-local.
pipx install awscli-local
Leveraging the awscli # [2]
If you want to use the cli pro
pipx install awscli
aws config --profile localstack
# put what you want for the keys, but enter a valid region like us-east-1
alias aws='aws --endpoint-url http://localhost:4566 --profile localstack'
References:
[1]: #easy-way
[2]: #leveraging-the-awscli