In the middle of the desert you can say anything you want
If I have a laptop and two external monitors, put the ‘distracting’ things on the laptop monitor and close the laptop. Open it when I’m officially doing a pause.
I shouldn’t forget that I have g
aliased to grep
, along with h
to history | grep
.
Just tried this and it works:
h vim | g http
Added this 1 to ./zshrc
:
expand-aliases() {
unset 'functions[_expand-aliases]'
functions[_expand-aliases]=$BUFFER
(($+functions[_expand-aliases])) &&
BUFFER=${functions[_expand-aliases]#$'\t'} &&
CURSOR=$#BUFFER
}
zle -N expand-aliases
bindkey '^E' expand-aliases
^E
is <C-e>
. Gets run anytime I use it, without connection to the written text. Neat.
Also found this in ./.zshrc
:
# Usage:
# In the middle of the command line:
# (command being typed)<TAB>(resume typing)
#
# At the beginning of the command line:
# <SPACE><TAB>
# <SPACE><SPACE><TAB>
#
# Notes:
# This does not affect other completions
# If you want 'cd ' or './' to be prepended, write in your .zshrc 'export TAB_LIST_FILES_PREFIX'
# I recommend to complement this with push-line-or edit (bindkey '^q' push-line-or-edit)
function tab_list_files
{
if [[ $#BUFFER == 0 ]]; then
BUFFER="ls "
CURSOR=3
zle list-choices
zle backward-kill-word
elif [[ $BUFFER =~ ^[[:space:]][[:space:]].*$ ]]; then
BUFFER="./"
CURSOR=2
zle list-choices
[ -z ${TAB_LIST_FILES_PREFIX+x} ] && { BUFFER=" "; CURSOR=2; }
elif [[ $BUFFER =~ ^[[:space:]]*$ ]]; then
BUFFER="cd "
CURSOR=3
zle list-choices
[ -z ${TAB_LIST_FILES_PREFIX+x} ] && { BUFFER=" "; CURSOR=1; }
else
BUFFER_=$BUFFER
CURSOR_=$CURSOR
zle expand-or-complete || zle expand-or-complete || {
BUFFER="ls "
CURSOR=3
zle list-choices
BUFFER=$BUFFER_
CURSOR=$CURSOR_
}
fi
}
zle -N tab_list_files
bindkey '^I' tab_list_files
<C-i>
gives a list of files in the directory, and space-space-tab at the beginning of the line too. <C-q>
(push-line-or-edit
). More about it here: TIL: save half-typed commands in bash and zsh « Serge Gebhardt (sgeb.io) TL;DR remove command currently being edited and paste it at the next Return.
Seen in the wild at work: ASAPST - like ASAP, but even more urgent. 1
Just found this hack: if the program you want to use doesn’t pick the right camera and you can’t control that through settings, open another program that will use the wrong camera - the first program will pick the first free camera, the one you want.
Didn’t know that underline is marked +like this+
. Why can’t we just agree on a flavour of markdown :(
Changed my main dtb log file from using spaces to using tabs. 1
:set tabstop=2 " To match the sample file
:set noexpandtab " Use tabs, not spaces
:%retab! " Retabulate the whole file
Added set listchars=tab:\:\
to vimrc. NB space at the end.
When trying to do this: find | grep \/model | grep descr | xargs vim -p
it opens all files in different tabs as wanted, but breaks the terminal afterwards (need to reset
it).
Sometimes I see it and randomly restart and somehow it goes away, today it didn’t.
The usual ‘Invalidate Caches & Restart’ didn’t fix it for me. BUT I had forgotten to annotate it as @Test
.
Other ideas about this from StackOverflow: 1
Uses asterisks, not indentation.
* I am a bullet point
** I am related to the first one
Didn’t notice it before, but Idea shows the beginning condition of the loop when it’s outside the screen and cursor is on it’s closing braket.
Write something that: a) pastes multiline things automatically at the correct indentation b) copies URIs alone, without leading tabs/spaces. As a bonus - copies only the URI at a certain line without anything else. (I believe I can use kitty for this too, need to look into hints again)
The magic formula I used in the irssi days for all cases works here too:
screen -raAd $n
To change it during runtime, <C-A>:scrollback $number
. Otherwise ~/screenrc
:
defscrollback 1000000
You can drag-n-drop files from the OS to a folder in nextcloud web gui, and it will automatically upload the file directly there (and inherit all permissions)
xinput -list
Note the id of “AT Translated Set 2 keyboard” (14 in my case), it’s the laptop keyboard, and of the one labeled “master keyboard” (3 in my case). xinput float $id
and xinput float $id $id-master
. 1
xinput float 14 #disables laptop keyboard
xinput reattach 14 3 #enables it back
Errors like:
Permissions 0644 for '/home/me/.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
can be fixed by setting the permissions to 400
.
--add_opens
+ $JAVACMD
For some reason the script took java8 instead of the java11 returned by which java
, through $JAVACMD
. Temporarily fixed by doing JAVACMD="/usr/bin/java" ./the_script.sh
.
If you leave screen in copy mode and detach, it’ll be in copy mode when you attach it back and give the impression that no new output happened from the time you detached it.
Das Indefinitpronomen all- - all- -
Alles ist gut.
Don’t forget that I can use sub/sup HTML tags in markdown!