Posts tagged: cli

All posts with the tag "cli"

tmux splitting panes

https://youtu.be/kzgyiHap1nQ

splitting panes is a core feature of tmux. It allows us to split the terminal vertically or horizontally into new panes.

bind -n M-s split-window -c '#{pane_current_path}' bind -n M-v split-window -h -c '#{pane_current_path}' bind -n M-X kill-pane

๐Ÿ—’๏ธ note that โ€˜#{pane_current_path}โ€˜will keep the split in the same directory as itโ€™s parent, without this it will default to your home directory.

...

tmux last session

https://youtu.be/RB87EEnnMnU

An ultimate productivity key-binding in tmux is one to switch to the last session. I use this to quickly get between sessions really quick. Often I am working and need to lookup a quick note, or copy something into my notes, then get back to where I was quickly.

bind -n M-b switch-client -l

I think of this hub and spoke model, and use last-session to quickly drive it.

...

tmux floating popups

https://youtu.be/2ZqFDsJywt8

Tmux popups are actually floating windows that you can drag around the screen. They always open in the middle (by default) when you open them, no matter where you leave them.

Here are a couple of keybindings I use to open up popup windows.

...

How to use git cherry pick

~/git via ๐Ÿ v3.8.5 โฏ mkdir git-cherry-pick-learn ~/git via ๐Ÿ v3.8.5 โฏ cd git-cherry-pick-learn ~/git/git-cherry-pick-learn โฏ git init Initialized empty Git repository in /home/walkews/git/git-cherry-pick-learn/.git/ git-cherry-pick-learn on ๎‚  main โฏ touch readme.md git-cherry-pick-learn on ๎‚  main [?] โฏ git status On branch main No commits yet Untracked files: (use "git add ..." to include in what will be committed) readme.md nothing added to commit but untracked files present (use "git add" to track) git-cherry-pick-learn on ๎‚  main [?] โฏ git add . git-cherry-pick-learn on ๎‚  main [+] โฏ git commit -m "init readme" [main (root-commit) ebd1ff2] init readme 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 readme.md git-cherry-pick-learn on ๎‚  main โฏ echo "Learn Cherry Pick" Learn Cherry Pick git-cherry-pick-learn on ๎‚  main โฏ git add . git-cherry-pick-learn on ๎‚  main โฏ git commit -m "add title git-cherry-pick-learn on ๎‚  main โฏ echo "# Learn Cherry Pick" > readme.md git-cherry-pick-learn on ๎‚  main [!] โฏ git add . git-cherry-pick-learn on ๎‚  main [+] โฏ git diff git-cherry-pick-learn on ๎‚  main [+] โฏ git diff --staged diff --git a/readme.md b/readme.md index e69de29..3490cef 100644 --- a/readme.md +++ b/readme.md @@ -0,0 +1 @@ +# Learn Cherry Pick git-cherry-pick-learn on ๎‚  main [+] โฏ git commit -m "add title" [main 148264d] add title 1 file changed, 1...

How I navigate tmux in 2021

In 2021 I changed the way I navigate between tmux sessions big time. Now I can create, kill, switch with ease, and generally keep work separated into logical groups.

Since making this post, I have made ~20 other posts in short form that all have a YouTube video to go along with them you can find them all on my tmux-playlist.

I took Chrisโ€™s tmux course in December 2020 and it was fantastic. Even as a seasoned tmux user, I learned quite a bit. Before the course, I was proficient in navigating within each of my tmux sessions but rarely started more than one session. A few months later, I have adopted a lot of what I learned from Chris and made it my own.

...

Newsboat

Web browsers are a black hole of productivity. I try to use them as little as possible when it is time to focus. I try to use help, ?, or ?? with ipython, or โ€“help at the command line as much as possible. What about that time I am trying to see what my online friends are posting on their sites? I used to used google reader quite heavily before that was taken down.

I am going to give a terminal rss reader a try for a bit and see how that goes for me. I have really struggled to get into an rss reader since google reader died.

I installed with the reccomended snap for Ubuntu.

...

025.md

setup

1 min

026.md

setup

1 min

006

Setup ** for _

1 min

git push without setting upstream

Finally after years of hand typing out a full git push --upstream my_really_long_and_descriptive_branch_name I found there is a setting to automatcally push to the current branch. More realisitically I just did a git push let git yell at me, and copying the suggestion.

git config --global push.default current

This one setting will now git push to the current branch without yelling at you that your upstream does not match your current branch. This helps me ship chnages faster as I am constantly chnaging projects and branches.

1 min read

simple click

cli tools are super handy and easy to add to your python libraries to supercharge them. Even if your library is not a cli tool there are a number of things that a cli can do to your library.

Things a cli can do to enhance your library.

๐Ÿ†š print version ๐Ÿ•ถ print readme ๐Ÿ“ print changelog ๐Ÿ“ƒ print config โœ change config ๐Ÿ‘ฉโ€๐ŸŽ“ run a tutorial ๐Ÿ— scaffold a project with cookiecutter

...

cmd.exe tips

I spend a lot of my time at the terminal for my daily work, mostly in Linux or wsl. One big reason for using wsl over cmd.exe is the ease of walking through history that fzf provides. This week we had a windows bug in a cli and I was stuck in vanilla cmd.exe ๐Ÿ˜ญ

First off if you are stuck using cmd.exe, do yourself a favor and get cmder. It makes life just a bit easier. It is super confugurable and comes with several power ups that make it a bit more enjoyable than cmd.exe.

F7 - Scroll through history

...

2 min read
cli

Amazon Web Services

I started using aws in March 2019. Here are some of my notes.

1 min read
cli