Wincent (Greg Hurrel) has a pretty solid and fast zshrc. I recently grabbed his completion section and it seems to be working better than whatever I had.
zsh completion snippet
All posts with the tag "cli"
Wincent (Greg Hurrel) has a pretty solid and fast zshrc. I recently grabbed his completion section and it seems to be working better than whatever I had.
zsh completion snippet
This is a sick looking bash script generator for installing binaries off of github releases. it reccomends curl into bash, but you could curl into install.sh and toss that in your dotfiles repo or wherever.
Install installer with installer
Tried out biome today and it worked better than prettier on jinja templates, I might adopt this over prettier.
Busting cache with curl. Iām not sure how much gets cached by curl, but I have ran into several cases where I am looking for new content and I want to ensure the content is new and no chance of being cached.
This article suggests 3 different techniques.
Bat is my favorite pager, its the one for me that seems to just work more than the rest. colors, syntax highlighting, line numbers search, it just feels the most natural.
Use prettier to format all files in a directory. By default prettier does not write, it just echos out the format that it would do. Give it the --write and it will write the changes to the files.
prettier --write .
I just used this on my thoughts repo.
sed can be a tricky beast, I often stumble when trying to pipe into it. Next time I need to use sed, I should reference this article by Nick Janetakis. He makes it looks much easier than my experience has been, and it appears to behave like a vim :%s/ substitution does, or a g/ g command.
Quickly and easily create new versions of your Python package with the gh release command. Get the version number, changelog, and
Releasing a new version of your Python package can be a daunting task. You need to make sure that all the necessary files are included, and that the version number is correct. But now, with the help of the gh release command, you can make the process much smoother.
The gh release command allows you to quickly and easily create a new version of your Python package. All you need to do is provide the version number, the changelog, and the distribution files. For example, if you wanted to create a new version of your package with the version number v1.2.3, you could use the following command:
gh release create v1.2.3 -F CHANGELOG.md dist/*.whl dist/*.tar.gz
This command will create a new version of your package with the specified version number, and include the changelog and the distribution files. Itās a great way to make sure that all the necessary files are included in the release, and that the version number is correct.
...
Moving panes between tmux sessions is something that makes tmux a very flexible and powerful tool. I donāt need this feature very often, but it comes in clutch when you need it.
Using choose-window I was able to come up with a way to select any pane withing any other session and join it into my current session.
# Choose a pane to join in horizontally bind f choose-window -Z 'join-pane -h -s "%%"'
Iāve long had this one in my tmux config, I always have a āscratchā session that Iām running, I often use for looking at things like k9s accross repos within a popup.
This use case puts a pane into the scratch session, then pulls it back out. I will use this to move a pane between sessions in the rare cases I need to do this.
jq has some syntax that will sneak up on you with complexity. It looks so good, and so understandable, but everytime I go to use it myself, I donāt get it. ijq is an interactive alternative to jq that gives you and nice repl that you can iterate on queries quickly.
paru -Syu ijq
Here are some other articles, I decided to link at the time of writing this article.
JUT | Read Notebooks in the Terminal
I recently made myself a handy tool for making screenshots in python and it need to do a git commit and push from within the script. For this I reached for How I Quickly Capture Screenshots directly into My Blog ... From the same Author that brought us command line essentials like You can install from one of the releases, follow the instructions for your system from the repo. I chose to go the nix route. I have enjoyed the simplicity of the nix package manager being cross platform and have very up to date packages in it. ... This morning I was trying to install a modpack on my minecraft server after getting a zip file, and its quite painful when I unzip everything in the current directory rather than the directory it belongs in. So Iāve been struggling to get mods installed on linux lately and the easiest way to download the entire pack rather than each mod one by one seems to be to use the overwolf application on windows. Once I have the modpack I can start myself a small mod-server by zipping it, putting it in a mod-server directory and running a python Then I go back to my server and download the modpack with wget. Now I can unzip my mods into the ... I recently gave a talk at python web conf 2022, and one of the things I did when I should have been working on my presentation was workig on how my presentation looked⦠classic procrastination technique. Lets use this section to show what it looks like as I change my styles. ā This is how my website is built This is what the above slide looks like in lookatme. ... I love the freedom of writing in markdown. It allows me to write content from the comfort of my editor with very little focus on page style. It turns out that markdown is also a fantastic tool for creating slides. I will most often just present right from the terminal using lookatme. Presenting from the terminal lets me see the results quick right from where I am editing. It also allows me to pop into other terminal applications quickly. I sometimes also use reveal.js, but thatās for another post. It is handy that it lives in the browser and is easier to share. I leverage auto slides when I write my slides in markdown. The largest heading, usually an h2 for me, becomes the new slide marker. Otherwise my process is not much different, It just becomes a shorter writing style. ... Setting up your git pager to your liking can help you navigate diffs and logs much more efficiently. You can set it to whatever pager you like so that your keys feel nice and smooth and your fingers know exactly what to do. You might even gain a few extra features. You can set the pager right from your command line with the following command. You can also set your pager by editing your global In my experience you need to turn colors off with nvim. bat handles them and looks good either way, but nvim will be plain white and display the color codes as plain text if color is on. ... If you have ever mistyped a git command very close to an existing one you have likely seen this message. What you might not have known is that you can configure git to just run this command for you. Now when you typo a git command it will autmatically run after the configured number of tenths of a second. ... I love that all of these modern tools built in go and rust, just give you a zipped up executable right from GitHub releases, but itās not necessarily straight forward how to install them. I use a bunch of these tools, and for what its worth I trust the devs behind them to make sure they donāt break. This so far has worked out well for me, but if it ever doesnāt I can always pick an older version. Since I am all trusting of them I just want the latest version. I do not want to update a shell script with new versions, or even care about what then next version is, I just want it. Luckily you can script the release page for the latest version on all that I have came accross. ... Kedro rich is a very new and unstable (itās good, just not ready) plugin for kedro to make the command line prettier. There is no pypi package yet, but itās on github. You can pip install it with the git url. You can run your pipeline just as you normally would, except you get progress bars and pretty prints. Listing out catalog entries from the command line now print out a nice pretty table. ... So worktrees, I always thought they were a big scary things. Turns out they are much simpler than I thought. no special setup I thought you had to be all in or worktrees or normal git, but not both. When I see folks go all in on worktrees they start with a bare repo, while its true this is the way you go all in, its not true that this is required. Making a worktree is as easy as making a branch. Itās actually just a branch that lives in another place in your filesystem. ...GitPython is a python api for your git repos, it can be quite handy when you need to work with git from python.GitPython.GitPython is a python library hosted on pypi that we will want to install into our virtual environments using...fd and bat written in rust comes pastel an incredible command-line tool to generate, analyze, convert and manipulate colors.http.serverpython -m http.server Downoading on the server #
wget 10.0.0.171:8000/One%2BBlock%2BServer%2BPack-1.4.zip Unzip to the minecraft-data directory #
minecraft-data directory.from markata import Markata Markata() markata.run()
git config --global core.pager 'more' .gitconfig file which by default is set to ~/.gitconfig.[core] pager = more Color #
⯠git chekout dev git: 'chekout' is not a git command. See 'git --help'. The most similar command is checkout Automatically run the right one #
# Gives you 0.1 seconds to respond git config --global help.autocorrect 1 # Gives you 1 seconds to respond git config --global help.autocorrect 10 # Gives you 5 seconds to respond git config --global help.autocorrect 50 Fat Fingers Gone #
yq is a command line utility for parsing and querying yaml, like jq does for json.yq does one of the best jobs I have seen, giving you instructions on how to get a specific version and install it.pip install git+https://github.com/datajoely/kedro-rich Kedro run #
Kedro catalog #