In the middle of the desert you can say anything you want
screenkey
1 (in the repos too) shows the keys you pressed on the screen.
screenkey --show-settings
shows a nice GUI before start with all the configs.
Looks like the second answer here: folding - Is there a best practice to fold a vimrc file - Vi and Vim Stack Exchange
This answer has an awesome idea for folds, something very close to what I was looking for in my long notes file: folding - Is there a best practice to fold a vimrc file - Vi and Vim Stack Exchange
In general TODO vim folds - create a nice stable system instead of the ad hoc hell I have now.
Also How to enable and use code folding in Vim? - Unix & Linux Stack Exchange has a nice summary of fold keybindings:
I forgot I used <leader>
for most of the things I’m currently using F12 for!
TODO I guess A shell script that changes monitor configurations, volume, changes some of the zsh aliases to show me the correct taskwarrior todos, etc.
Something like this:
#!/bin/zsh
if [ "$1" == "work" ]
then
echo "Setting configs to work..."
export SOMETHNIG="something" ...
...
else
echo "Setting configs to home..."
export SOMETHNIG="something" ...
...
fi
zsh
How do I get all open terminals to use the new env. variables though?
If you paste an URL containing characters with a meaning in markdown, it breaks syntax highlight till the end of the file. Especially URIs containing an uneven number of underscores. Fix is either make it code
, or indent it - it seems formatting is local for indentation, at least for vim.
jq
stdin
, otherwise it’s jq filter inputData
.It supports newlines in filters!
“Data science and the command line” (from json - How to nicely remove empty array in jq - Stack Overflow}
I can drag and drop my screenshots in the terminal and it pastes the absolute location!
Wow. …wow. command line - Uniq won’t remove duplicate - Unix & Linux Stack Exchange
This explains really a lot.
The &&
and ||
operators “short-circuit”, meaning they don’t evaluate the right-hand side if it isn’t necessary.
The &
and |
operators, when used as logical operators, always evaluate both sides.
There is only one case of short-circuiting for each operator, and they are:
false && ...
- it is not necessary to know what the right-hand side is because the result can only be false
regardless of the value theretrue || ...
- it is not necessary to know what the right-hand side is because the result can only be true
regardless of the value there. 1Clicking on “improve this answer”, even when not logged in, gives access to the source markdown that I can copy here preserving most formatting.
Stand-off markup (also known as remote markup or stand-off annotation) is the kind of markup that resides in a location different from the location of the data being described by it. It is thus the opposite of inline markup, where data and annotations are intermingled within a single location. 2
The wiki it’s from is also nice: TEIWiki It’s All pages - TEIWiki would be interesting to look through, NB it has a non-intuitive “next page” link there.
I need either a command or an alias for “create task and start immediately”, along with some nice way to create boilerplate code for tasks
“In case if you want to “go back in time” while debugging you can do it via Drop Frame action. This is a great help if you mistakenly stepped too far. This will not revert the global state of your application but at least will get you back by stack of frames.” 3 (Icon with a red X on top left.)
Does it make a difference if I declare variables inside or outside a loop in Java? - Software Engineering Stack Exchange - TL;DR it doesn’t, if you are not creating complex objects. The way to learn this is to look at the generated bytecode, using javap
.
This is freaking awesome:
k: history-search-backward
j: history-search-forward
… in ~/.inputrc
allows using j/k for scrolling through history in vim mode. 1 This configures readline
that then is used by (at least) bash, zsh, and fish.
ag
commandI still have it installed as a standalone command, I should use it. Ag (silver searcher) is better than ack, which is better than grep. ggreer/the_silver_searcher: A code-searching tool similar to ack, but faster.
TODO get proficient with them and learn how exactly they are better for writing code.
dict.cc | muskelkrampf | English Dictionary - muscle cramp
<Ctrl-Shift-f>
for “Find in path” - extremely useful for large codebases; info from Tony.
“The best minds of my generation are thinking about how to make people click ads.” –Jeff Hammerbacher
Found on I no longer build software | Hacker News in the context of Allow docker push’ to push multiple/a subset of tags · Issue #267 · docker/cli · GitHub:
@solvaholic: Sorry I missed your comment of many months ago. I no longer build software; I now make furniture out of wood. The hours are long, the pay sucks, and there’s always the opportunity to remove my finger with a table saw, but nobody asks me if I can add an RSS feed to a DBMS, so there’s that :-)
In ‘set status’ there’s a ‘clear’ option, it controls when the status gets reset, minutes/days.
Uncle Dave - YouTube (No script is too simple | Hacker News) - for later. Notable there is:
<Alt-Shift-9>
and the ideavim cursor works!<Alt-F10>
is also really usefulredshift
Remembered that redshift
exists, added it to startup. It’s the program that makes screen redder at night, a la twilight / night mode / etc etc etc.
Reopening closing windows can be done through View -> Tool windows. It has nice shortcuts that are <Alt-N>
, with N=0..9. For example, debug window is <Alt-5>
.
Additionally - I should use F7
/ ‘step into’ much more.
<Alt-7>
opens a nice structure window with info about the long class you’re editing. With nice options like show public/fields/..
java - Save state of object in IntelliJ debug? - Stack Overflow - google/gson is the answer. User guide: gson/UserGuide.md at master · google/gson · GitHub
Gson gson = new Gson();
gson.toJson(1); // ==> 1
gson.toJson("abcd"); // ==> "abcd"
gson.toJson(new Long(10)); // ==> 10
int[] values = { 1 };
gson.toJson(values); // ==> [1]
// Deserialization
int one = gson.fromJson("1", int.class);
Integer one = gson.fromJson("1", Integer.class);
Long one = gson.fromJson("1", Long.class);
Boolean false = gson.fromJson("false", Boolean.class);
String str = gson.fromJson("\"abc\"", String.class);
String[] anotherStr = gson.fromJson("[\"abc\"]", String[].class);
Not drag-and-drop for more complex stuff though.
You can create breakpoints at all exceptions of a certain type, even when they are caught. May lead to discovery that there are a lot of them in the code :)
On this topic - “Run to cursor” is nice
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
}