In the middle of the desert you can say anything you want
das wasserzeichen - Watermark! (Heard at work) die dringlichkeit - urgency. “Besondere Dringlichkeit”. Verschiedene Dringlichkeiten. (heard at work)
blueman
is a nice semi-gui suite for everything. bluetoothctl
is an interactive cli.
lawl/NoiseTorch: Real-time microphone noise suppression on Linux. - creates virtual devices that are the same as inpucts, but filter the noise. Works really well for me! (Single binary). Works also for filtering voice in outputs! Listening to songs through it is weird.
Changed date
format from %+V
to just %V
, which gives a sprint like 01 instead of 1 (which in turn removes the need for sprint.is:1
filtering in taskwarrior, now sprint:01
is a unique identifier)
~/.zshrc
:
export SPRINT=$(date +%V)
For this, a subset has to become bad values, and a cmap has to set what to do with them.
my_cmap = copy.copy(plt.cm.get_cmap('gray')) # get a copy of the gray color map
my_cmap.set_bad(alpha=0) # set how the colormap handles 'bad' values
plt.imshow(thing, cmap=my_cmap)
As for bad values, I wrote a function similar to this to make them arbitrary:
def get_bad_values(matr, value=0):
new_matr = matr.astype(np.float)
new_matr[new_matr == value] = np.nan
return new_matr
Note that np.nan
can only replace a np.float
, never an int!
Made everything simpler, based on what I usually really need:
bindsym $ms+s layout toggle tabbed stacking
bindsym $ms+Shift+s layout toggle split
TODO - something for “focus tab N in currently focused container”, a la what I have in qutebrowser/intellij.
.. TODO - fix this, finally.
+DAY=$(((365)*2+10#$(date +%j)))
Added this to ~/.ideavimrc
for moving between splits
map <leader>h :action PrevSplitter<CR>
map <leader>l :action NextSplitter<CR>
map <leader>o :action MoveEditorToOppositeTabGroup<CR>
script
The script
utility exists, and is installed by default on at least two systems I have access to. Works really well for interactive sessions!
script --timing=time.txt script.log
scriptreplay --timing=time.txt script.log
Seems to work when ran through screen, even when the screen is detached!
How to Record and Replay Linux Terminal Sessions using ‘script’ and ‘scriptreplay’ Commands
This is really cool: command line - How to have a terminal mirrored onto a second screen in a two-monitor setup? - Ask Ubuntu
script -f /tmp/lecture1.scrpt
tail -F /tmp/lecture1.scrpt
-f
is for “Flush output after each write.” (as opposed to “write everything to the file when script
is terminated”)
Couldn’t understand why there are newlinen in my yearly review blog post from last year. So - in markdown, two spaces and then a line break create a line break.
So, like this:
One
two
Three
Four
Fine, no spaces Six, no spaces
Highlight to see spaces:
So, like this:
One
*two*
> Three
> Four
> Fine, no spaces
> Six, no spaces
In connection to the above, yes. Updated ~/.vimrc
with the following:
set listchars=tab:\:\
set listchars+=trail:◦
Looks like this:
For the above had to convert my ~/.vimrc to utf-8, not the default latin-1:
:w ++enc=utf-8
<C-v> u25e6
(for “◦”/U+25E6, for example)This makes a screenshot as usual, opens it, opens the jekyll dtb assets folder, and puts the screenhsot name in the primary clipboard. I look at the screenshot, if I like it - I drag it directly to the folder, then use the vim/jekyll binding to insert it in the markdown.
bindsym Mod3+Shift+s --release exec scrot -s -e 'mv $f ~/s/screenshots && nomacs ~/s/screenshots/$f & echo -n $f | xclip -selection c && thunar ~/o/dtb/assets/pics/screenshots/'
echo -n
is echo without newline (otherwise it gets fed to xc with newline appended). Added to ~/.config/i3/config
.
Feels incredibly ugly and unstable but works for me I guess. Ideally it’s long enough to be replaced with a bash script, but not sure it’s worth it. But if I end up doing more of these, I’ll create a one custom big parametrized bash script that I’ll call like ./big-script.sh screenshot
.
map <leader>p i![](/assets/pics/screenshots/<esc>pa)<esc>0lli
in ~/.vimrc
Inserts a picture with filename from primary selection, then goes back to the description. Used with new i3 screenshot keybinding from above. a
in vim is “insert from next character”, so like A
but with words.
I really do need to use a
/e
etc in vim more often.
I seem to use more of-this-notation
lately, instead of this_notation
. Formalize this, not just for consistency, but to use this to my advantage - vim and company see these-words as separate, and this_word as one.
echo
without newline at the endecho -n
doesn’t add a newline. Especially useful combined with xclip
.
WKD - Matsuo Basho Archives: - Timeline -:
1662 or 1663 寛文二年
His first known hokku at age 19:春や来し年や行きけん小晦日
haru ya koshi toshi ya yukiken kotsugomori
has spring come
or has the year gone?
second-to-last-day
Tr. Barnhillwhat is spring that came
or was it the year that went?
the Second Last Day
Tr. UedaIst das Frühjahr gekommen
oder das Jahr vergangen?
Der vorletzte Tag.
Tr. Udo Wenzel
The Ukrainian translation seems imprecise, but still remains my favourite: Аніяких думок не лишилось в моїй голові наприкінці року!
Чи вже про весну, чи про минулий рік думати? Передостанній день року.
Переклад Геннадія Туркова
Послание к Римлянам 13:4 – Рим 13:4:
ибо начальник есть Божий слуга, тебе на добро. Если же делаешь зло, бойся, ибо он не напрасно носит меч: он Божий слуга, отмститель в наказание делающему злое.
Послание к Римлянам 13:4 – Рим 13:4: https://bible.by/verse/52/13/4/
Updated zsh alias to include non-work tasks tagged +A
or +O
from current sprint:
s () {task s \(project:w or \(sprint:$(date +%-V) \(+A or +O\)\) \) "$*"}
or
has to be lowercase, brackets in taskwarrior’s filtering have to be escaped.
Use a formula like this:
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1xrGsOD-yXuORqd8cFg21XOo3ZIw9QbSiNDcnSEatlPM/edit#gid=0", "Sheet1!A:A")
1
For me it was ;
as separator; may need to confirm connecting sheets.
Changed colour of +F tasks to a better shade of gray in .taskrc
# color.tag.F=color239
color.tag.F=color244
curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash
(yay for curl | bash
!)
/
)\
)TODO - all German IT words in one place, and add them to Anki
Structural search and replace examples—IntelliJ IDEA is neat! Templates are like this:
$Instance$.$MethodCall$($Parameter$)
Note the “target”, usually it’s set to a complete match, but by call and by params exists too.
I had to disable ideavim, because it was doing some weird formatting by itself with brakets and indents that broke checkstyle.
Filters are also important - $params$
will catch only what.function("one")
, but won’t what.function(one, two)
- had to change count to be [1, +inf]. (1, not 0, because I needed to avoid replacing what.function()
.)
“Expression cannot be replaced by non-expression” - if you add a ;
at the end of the template, it’s an expression now, and the replacement also needs a ;
now.
pass
);
works! 1
A bigger one that makes checkstyle happy is assert true;