In the middle of the desert you can say anything you want
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!
Created a new basedir, where I symlinked the config.py from the original one:
11399 5.11.2020 09:54 ln -s ~/.config/qutebrowser/config.py ../profile2/config/config.py
To run with it, python3 qutebrowser.py -B ../profile2
(-B
is the same as --basedir
)
My use case would be to run a separate instance with tabs on top instead of in the left, for jupyter and similar. I can’t set tab position per window in the same profile.
As I seem to do that often:
xrealpath() {
realpath "$1"
realpath "$1" | xc
}
xpwd() {
pwd
pwd | xc
}
Both outputs to screen and saves to buffer. xc
is still this:
alias xp='xclip -selection clipboard o'
Nullable integer data type — pandas 1.1.4 documentation
Usual int
cannot contain NaN
values, and things like df[0].astype(int)
fail in that case.
To use nullable ints: df[0].astype('Int64')
. (Note - it’s a string. int
works both ways.)
Pandas can do styling! Had no idea: Styling — pandas 1.1.4 documentation
def _color_original(s):
if s[5]==-1:
return ['background-color: lightgrey']*len(s)
elif s[5]>0.9:
return ['background-color: #a5a1ff']*len(s)
elif s[5]>0.8:
return ['background-color: #bebaff']*len(s)
elif s[5]>0.7:
return ['background-color: #d8d6ff']*len(s)
else:
#print(s)
return ['background-color: white']*len(s)
df.style.apply(_color_original, axis=1)
style.applymap()
is elementwise, style.apply()
is per row/column/table.
<Ctrl-Shift-R>
does a hard-restart that sometimes fixes issues with Electron apps such as Slack. (TS)
~
inverts boolean values.
Used like this:
dd[~dd.companyName.str.contains("po")]
-> “does not contain”
Sehr schönes deutschsprächiges Buch über Java, dem ich nützen könnte, um mein IT-Wortschatz zu verbessern:
Rheinwerk Computing :: Java ist auch eine Insel - Inhaltsverzeichnis
The commit window is (as with conflict resolution) a fully-functioning text editor, including all the usual ideavim bindings! All changes/diffs get automatically updated as they get changed.
“Copy”-ed files get pasted as the filename with all the extensions. “Copy filename” does only the file name, w/o the last extension.
I’ve been bitten by this before at least twice. When copypasting them, for example even from another Intellij running configuration, check for spaces at the end. Not visible at all ever in any of the context one might hope to see them.
Called jshell
on my box. Has tab-completion etc. Really nice!
jshell> NavigableSet original = new TreeSet();
...> original.add("1");
...> original.add("2");
...> original.add("3");
...>
original ==> []
jshell> original.floor("2")
| Warning:
| unchecked call to floor(E) as a member of the raw type java.util.NavigableSet
| original.floor("2")
| ^-----------------^
$8 ==> "2"
Think about compareTo()
and equals()
of the classes if I’m doing something that may need it. Such as using Pair
s as keys in a TreeSet
and expecting that they will be compared only based on first value.
Java: Integer equals vs. == - Stack Overflow
Using !=
/==
… works only for Integers -128..127. Otherwise they will likely be different Objects => not equal.
And of course, -128..127 is exactly the kind of numbers one might see in tests as opposed to real world situations.
The way to do it is if (!one.equals(two)) {
TODO read this: Java gotchas - OWASP
(Link from AA in the context of comparing integers)
I usually use
sleep 5m && foobar
, so if I change my mind and^C
thesleep
, the next command doesn’t run. – Peter Cordes May 28 ‘16 at 14:07 1
And sleep
is installed by default in a lot of places!
sleep 5m && foobar
From the man page:
SUFFIX may be ’s’ for seconds (the default), ’m’ for minutes, ‘h’ for hours or ’d’ for days. Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number.
!wa now plus 12.5h
bash - unix diff side-to-side results? - Stack Overflow
diff -y
(NB not git diff
) does really nice side by side viewing, and still colours output in the columns.
Found Think Java in my old notes and it’s really nice.
Ctrl+C - “Steuerung-C” - Strg.
Intersection over Union (IoU) for object detection - PyImageSearch TODO + add to Fiamma
This again, but:
\v
- very magic - everything has special meaning\V
- not magic - everything has literal meaning meaning, \
to activate special