I had presented in a previous post how I can easily rerun a previous command on the command line. I used this approach to speed the edit-run cycle for scripting. A better way yet is to use a custom Vim binding to execute the previous command using tmux’s
send-keysmechanism. Furthermore, one can directly switch to the tmux window where that command is running.
When working with a large database, some
SELECTqueries can take really long. And “really long” starts at a minute or two, of course. When designing queries, one often limits the result set because one is not yet actually interested in the final data.
It is common (and secure) practice to save cryptocurrency/blockchain keys on paper. There exists several tools for the various blockchains to generate a public/private key pair and the corresponding the paper wallet at once. In this post, I would like to show you how I created my custom paper wallets.
I happen to find myself regularly in the situation of writing a throw away BASH script. Often, I need to run the script several times before I have it implemented correctly. This is the typical edit-(compile-)run cycle most programmers know. The trial-and-error workflow must be of course as fast as possible. I am already using tmux so switching between the editor and the console where the script runs is pretty fast. Still, I need to switch to that window, recall the previous command and execute it again. The appropriate tmux/shell key sequence would be
<tmux-prefix>4<CAPSLOCK>k<ENTER>. Let’s examine this in detail
<tmux-prefix>4 Jump to the window (in this case window #4) where the script is run. <CAPSLOCK> Enter Normal mode in Zsh. I am using vi-mode in the shell and have mapped CAPSLOCK to ESC k Scroll up to the previous command. This is the previously executed script, of course. <ENTER> Execute the command.
In this post, I am going to present some simple tips when using grep.
... Archive ...
subscribe via RSS