In the middle of the desert you can say anything you want
Tohu wa-bohu - Wikipedia “is a Biblical Hebrew phrase found in the Genesis creation narrative (Genesis 1:2) that describes the condition of the earth (eretz) immediately before the creation of light in Genesis 1:3.”
Now let’s play with Jekyll and UTF-8.
וְהָאָ֗רֶץ הָיְתָ֥ה תֹ֙הוּ֙ וָבֹ֔הוּ וְחֹ֖שֶׁךְ עַל־פְּנֵ֣י תְהֹ֑ום וְר֣וּחַ אֱלֹהִ֔ים מְרַחֶ֖פֶת עַל־פְּנֵ֥י הַמָּֽיִם
— Genesis 1:2, Westminster Leningrad Codex
Now the earth was formless and empty, darkness was over the surface of the deep, and the spirit of God was hovering over the waters.
— Genesis 1:2, New International Version
So, before we had this file:
echo "Concatting all existing days"
cd _posts
echo \
"---
layout: page
title: Master file
permalink: /master/
---
"\
> ../master_file.md
cat * | grep -v "layout: post" | grep -v "categories: \[" | grep -v "title: \"Day" | grep -v "date: 20" | grep -v "\-\-\-" >> ../master_file.md
This didn’t really work well for various reasons, now I did this right:
{% raw %}---
layout: default
---
<div class="home">
{%- if page.title -%}
<h1 class="page-heading">{{ page.title }}</h1>
{%- endif -%}
{{ content }}
<ul class="post-list">
{% for post in site.posts %}
<h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
<p class="author">
{% assign date_format = site.minima.date_format | default: "%b %-d, %Y" %}
<span class="post-meta">{{ post.date | date: date_format }}</span>
</p>
<div class="content">
{{ post.content }}
<br>
</div>
{% endfor %}
</ul>
</div>{% endraw %}
Master file is at the same URI: Master file | Diensttagebuch
The nice tags for raw input, of course, work immediately, no spaces between (%raw%)And the start of the actual content(%endraw%)
.
dict.cc dictionary :: Die Kacke ist am Dampfen :: German-English translation == shit hitting the fan
One can export it to ~/.idea/runConifgurations/*.xml
which can be edited with any editor or copied to another project folder.
Had this issue when creating a project in a folder that was not equal to the folder with the project files downloaded from git. It did not automatically recognize .git
, but I could do it from the VCS menu, something like “choose VCS type”->git etc. Disappeared after I did it.
From Error on openjdk11, cannot find javadoc · Issue #26 · chenjianjx/wsdl2html · GitHub:
export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
readlink
resolves symlinks. Alone it just gives you the file the symlink points to. readlink -f
follows each and every symlink to the very end. On my box, the difference is:
me:~/ $ readlink /usr/bin/javac
/etc/alternatives/javac
me:~/ $ readlink -f /usr/bin/javac
/usr/lib/jvm/java-11-openjdk-amd64/bin/javac
BUT! The actual JAVA_HOME
thing should be solved as a setting in Intellij->Maven, as noted in Day 554 | Diensttagebuch.
TODO Ankify: spelling of Colleague
schnipsel | Übersetzung Englisch-Deutsch - scrap/shred/snipped (noun). Mentioned by Caro in context of Schnitzeljagd – Wikipedia that is an interesting thing by itself.
git --color=never
means that no color gets added by git, but any existing is preserved. Usually the program piping the output has to be told that colours are still needed despite the fact that it’s not outputting to a terminal.
Pretty CSV viewing on the Command Line - Stefaan Lippens inserts content here this is realy nice! In goes a CSV, out goes a pretty CSV. With all the tabs right etc. Piping output from daff diff
to this works wonders.
Added his function to .zshrc
:
function pretty_csv {
column -t -s, -n "$@" | less -F -S -X -K
}
w
vs e
+ vim movementsI should use e
much more than w
, as that’s what I really usually need. And in general I should take the time to get to know better the tools I’m constantly using. I guess ‘right’ vim is something like ‘right’ typing.
Also, never used them like this, but c
of course takes all movements, so changing next two lines or changing from cursor to beginning of the line also works.
This 1 is how you do collapsible spoilers in Jira:
{code:bash|title=Header for code|collapse=true}
echo this is some code
{code}
Shows also how to define which syntax highlighting to use.
Added this to config:
map kitty_mod+p>c kitten hints --type path --program @
- copies hinted URL to clipboard.
Default map kitty_mod+p>f kitten hints --type path --program -
- pastes the hint to the current terminal window.
This gets rid of so much copypasting oh my God.
The setting for freezing headers and stuff so that they remain visible wherever you scroll is in View -> Freeze cells
sort -k 13 -k 15 -k 7 -t ";" -d filename
- here the multiple -k
s are the different sorting keys. -t
is separator, and -d
is dictionary order. Interestingly, it automatically sorts by everything else too after the column you give it - if you want it to look only at that one column, you do -k 2,2
2
I have been using \s
as “word separator”, this is wrong. \s
in vim is just a whitespace character - so tabs, spaces etc. For what I usually want, \A
is any non-alphabetic-character. (\a
being an alphabetic one).
/\vcat (dog)@!
/cat \(dog\)\@!
First one is very magic, second is the same without it. @!
is a negative match to the preceding capturing group (could have been (\1)
too).
\v
activates “very magic” mode where everything except letters and underscore has special meaning. This is actually going to be very handy. 1
I’ve actually been using regexes quite a lot lately, have no idea how I lived without them when parsing very big log and text files.
:s/<Ctrl-R>/
inserts the last searched for regex between the slashes. This is wonderful and no more copypasting stuff! 1
In settings, you can configure checkstyle to run everywhere [not] including tests. If you don’t include tests, you won’t get to ‘run checkstyle on the current file’.
If I have windows that are tabs stacked vertically to make it not-a-tab-anymore I just have to move it one level above or below tabs. If it’s stack 3/3, amking it 4/3 would make it the bottom part of a split whose top part is vertical tabs.
"*
and "+
etc work; zsh stuff is kept in its own separate nice register unless you explicitly tell it to use one of the external ones... predictably, “Download sources” makes them downloaded, readable and debuggable.
Also nice is the “Alternative source available for” - todo understand how exactly do poms, sources, etc etc etc. play with all this. I assume if maven module wants X, and X can be found in maven and in the list of dependencies in Intellij, I get this choice?
To continue the idea to make it easier to record my steps, did some changes to the clean
oh-my-zsh theme. For this, I made a copy of the theme file /home/%username%/.oh-my-zsh/themes/clean2.zsh-theme
, and using zsh: 13 Prompt Expansion added the following:
RPROMPT='%*/%!'
)PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%5c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) '
, the number 5 represents the number of directories to show.)Now the prompt looks like this:
%username%:~/o/dtb/assets/pics/ (master✗) $ 16:14:10/10548
:quarter
Timewarrior has many interesting hints, I always missed something with now and previous month - of course :quarter
exists.
This should have been done long ago but discovered this now. If I have both a wiki and ethernet and want to stop connecting to the wifi, disconnecting from the endpoint is much less reliable than disabling wifi alltogether.
fc
and historyfc
also accepts the history number of the command to edit and run.
So fc 1238
, for example.
<Esc>
Quite often, especially in the commit window, I want to use Ideavim’s normal/command mode, but <Esc>
gets intercepted by Idea and closes the commit window. My old mapping works though:
imap jj <Esc>
in .ideavimrc
.
set clipboard=unnamed
does for vim. is really really really nice.git clone https://github.com/kutsan/zsh-system-clipboard ~/.zsh/plugins/zsh-system-clipboard
Then
source "$HOME/.zsh/plugins/zsh-system-clipboard/zsh-system-clipboard.zsh"
in .zshrc
Now I can yank stuff from the zsh command line and paste them in other applications etc.
Looked into the TZ
environment variable, it’s the overwritten “Berlin” one. I forgot I had this beauty in .zshrc
:
export TZ="/usr/share/zoneinfo/Europe/Berlin"
Probably a relict of an old hacky way to set time when I couldn’t do it properly.
Interestingly, even i3status listened to it (how? why? At which point does it access zsh environment variables? Are environment variables zsh-specific and accessible to things started by/within zsh? How does this work? TODO).
And interestingly, restarting zsh
didn’t get date
to output the right date, even with the right timezone set, I had to close and reopen the terminal.
Removed that line, restarted i3, now all times are set right and I can remove timezone info from my timestamps.
imap <leader>d <esc>:put =strftime('%c')<cr>kJA
imap <leader>t <esc>:put =strftime('%H:%M:%S')<cr>kJA
They look like this:
Fr 04 Sep 2020 09:54:59 CEST
09:55:00
If I’m copypasting something from vim with yW
it copies the space after the last word. If I then paste it into the search of qutebrowser it won’t find anything if the string in the page doesn’t have a space after it.
git diff --color-words="[^[:space:],]+"
1
Daff is a “library for comparing tables, producing a summary of differences”. GitHub - paulfitz/daff: align and compare tables
It actually does a really nice visualization with colours, like that script I wrote a long time ago. Leaves field numbers too. In general it’s awesome.
More options available with the full form: daff diff --id field --padding sparse file1 file2
Has a lot of output formats!
Even ordered/unordered works, if you don’t set the wrong id
column.
To make the markers marking folds easier to edit, one can select an empty line at the end of zf
, they will end up on a line by themselves, and you can happily paste stuff inside the fold.
ff
is now find | grep
# bindsym $ms+d exec --no-startup-id i3-dmenu-desktop
bindsym $ms+d exec rofi -show run
# select windown
bindsym $ms+g exec rofi -show window
in i3/config
. Rofi is nice and I forgot about it.
Added a list of windows on $ms+g
so that it’s similar to my qutebrowser keybinding.
The default, “Compile”, is the “strongest”. Module dependencies - Help | IntelliJ IDEA contains a really nice table summarizing compile/test/runtime/provided.
mvn -Dtest=UsersServiceImplTest test
for all tests in that class, but you can also do wildcards and single test (yourclass#yourtest test
) 1
Order is important and whichever is the first will be used.
You can change the order in the GUI, but you can move them one step above and you can’t move multiple dependencies at the same time. Of course if you add a new one it goes to the veeeery end.
You can edit the configuration manually, inside the project it’s the .iml
file that can be edited via whatever.
cut
This is a thing that keeps coming up, TODO anki
awk - bash: shortest way to get n-th column of output - Stack Overflow
cut -f2
accesses the second field. -d
is for delimiters, if not equal to tab.
Fex.net seems to be an OK service for sharing stuff, S. used it for wedding pictures and A. used it for uploading an .iso, both worked well.
For multiple files with known settings, such as separator, decimal etc., libreoffice --calc mydata.csv --infilter=”CSV:44,34,0,1,4/2/1”
- Separator, 44 is the ASCII value of comma
- Text delimiter, 34 is the ASCII value of double quote
- Character set to use, 0 is the system default
- Line number to start conversion. I have no header line, so it is 1
- Cell format per column, separated by /. It does not seem to matter if there are a different number of columns in the data: Extra columns default to Standard, extra formats are ignored. 4 = date d/m/y; 2 = text; 1 = standard 1
Full documentation for infilter
is here: Filter Options - Apache OpenOffice Wiki
I have to remember that putting markdown stuff inside HTML tags won’t work, like with the Actionlist yesterday.
Is it possible to git-diff a file against standard input? - Stack Overflow:
echo foo | git diff --no-index -- my_file -
Since git 1.5.1 there’s been an option to diff against stdin - it’s just not been documented
Sinngemäß übersetzt steht „c/o“ für „bei“.