In the middle of the desert you can say anything you want
:digraphs
to see the available digraphs. <C-k>
+%digraph% inserts it. For example, <C-k>+Pd
→ £
'.
- move to last modified line.D
- delete everything until the end of the line.C
- change everything until the end of the lineU
- undo all changes to this lineS
- substitute everything inside this line<C-a>
- increment number at character<C-x>
- decrement number at characterLearn to use my ;
->:
mapping
“I’ve come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works. 2. Anything that’s invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. 3. Anything invented after you’re thirty-five is against the natural order of things.” — Douglas Adams
“Be here now”
Aaaand from this Reddit thread:
If it starts appearing on the wrong monitor, I can drag it to the right one, and its location will be remembered.
sudo !!
. This is awesome.
TIL about Pareto charts, and they look very interesting.
To take the example below, in order to lower the amount of late arrivals by 78%, it is sufficient to solve the first three issues.
are the next thing that will save my life, we’ll see if they stick.
Карта чуств is absolutely brilliant.
In college, I ran a painting business. Every painter I hired had to buy their own brushes. This was one of the first things I learned. Throwing a standard brush at new painters didn’t work. The “company” brushes were quickly neglected and degenerated into a state of disrepair. But painters who bought their own brushes took care of them. Painters who bought their own brushes learned to appreciate the difference between the professional $20 brush they owned and cheap disposable dollar store brushes. Having their own brush engendered a sense of enduring responsibility and craftsmanship. (from Codinghorror “The Programmer’s Bill of Rights)
Allegedly there’s an official way, though I could not get it working: rsync -a --info=progress2 src dest
What works is the second answer:
rsync -aix /source remote:/dest | pv -les $(df -i /source | perl -ane 'print $F[2] if $F[5] =~ m:^/:') >/dev/null
, and the general way rsync -ai /source remote:/dest | pv -les [number of files] >/dev/null
.
To find number of files in general, find /source|wc -l
.
There are two sorts of comments - “What” comments and “Why” comments.
“What” comments tell you what the code is doing. In a lot of cases, depending on the language, the need for these can be reduced by writing clear code. This is much easier in, say, Python than Assembly. Even in Python though, sometimes you can be doing something a bit subtle where a 2 line comment can clear things up. These comments aren’t irreplaceable because with a bit of reading and work, you have all the information to work out what is happening.
“Why” comments are much more important - telling the reader WHY the code is doing whatever it is that it’s doing. The ’trim()’ comment referenced in the article is a great example of a Why comment - all the reading around the code wouldn’t give you an explanation (although sometimes git blame will).
Many ‘what’ comments are superfluous, almost no ‘why’ comments are - they are the collective memory of design decisions that otherwise lives in people’s heads. (HN)
For programs I don’t trust, Firejail seems okay. firejail <appname>
.
Still works as I remembered it. adb push <sourcefile/s> <location>
, where location
in my case is storage/sdcard0
for the memory and storage/FD...
for the sdcard. adb shell
is very nice also.
3 shell scripts to improve your writing, or “My Ph.D. advisor rewrote himself in bash.” is an excellent description of typical errors in technical writing. One of the pages I see that make me want to archive everything linked here and on the Link Wiki just in case it disappears. Also,
In that sense, peer reviewers are the guardians of the scientific community’s most limited resource: our collective attention span.
weasels=“many|various|very|fairly|several|extremely
|exceedingly|quite|remarkably|few|surprisingly
|mostly|largely|huge|tiny|((are|is) a number)
|excellent|interestingly|significantly
|substantially|clearly|vast|relatively|completely”
Let the past die, kill it if you have to.
LSD is a very nice replacement for ls
. To set it up, I needed to download the individual fonts from Nerd fonts, cp
-ing them to /usr/share/fonts
, then running fc-cache -f -v
.
To set up the new DejaVu font in urxvt
, this is the line in .Xdefaults
:
URxvt.font: xft:DejaVuSansMono Nerd Font Mono:pixelsize=12 URxvt.boldFont: xft:DejaVuSansMono Nerd Font Mono:pixelsize=12:weight=bold URxvt.letterSpace: -1
And in st
, config.h
is:\
static char *font = "DejaVuSansMono Nerd Font Mono:pixelsize=12:antialias=true:autohint=true";
AUR has a BIG nerd-fonts-complete
package with all the fonts.
Following the advice in this article:
bspc monitor HDMI-0 -d 1 2 3 bspc monitor eDP -d 4 5 6 7 8 9 0 a b cin `bspwmrc`, and
polybar example & polybar big &in `launch.sh`, and
[bar/big] monitor = HDMI-0 [module/bspwm] used = %name% label-occupied = %name% label-urgent = %name%! label-empty =in `polybar/config`.
Also to make the tray appear only on the right monitor, I commented out ; tray-position = right
on the HDMI monitor, now it appears again on eDP.
They work a bit different than i3 – the workspaces I list in each of the monitors in bspwmrc
are accessed sequentially via the keyboard. That is, in the config above, f1..f4 get accessed with Mod+1..4
, and Mod+5..x
access the I..X ones. I think they get cycled from the left monitor to the right one, but definitely not in the order the monitors are set up in bspwmrc
and not alphabetically.
Stolen mostly from dotfiles in this repo:
bspc config pointer_follows_monitor true # brings pointer to focused monitor (see workspaces)and in `polybar/config`
[module/bspwm] label-empty =
Amongst other things – I’m not sure how to move my windows from the HDMI workspaces if I disconnect the second monitor from the computer, partly it means I’m (I think, for now) limited to a number of workspaces in each of the monitors. I’m not sure I miss the flexibility of this process in i3 - it might be a good opportunity to play with a much more structured number of workspaces. Maybe I don’t need the flexibility as much as I think.
full-screen-api.ignore-widgets
in about:config
(from here) is the best thing since sliced bread. I can F11 firefox, but it doesn’t occupy my entire monitor, just removes tabs/url/…, and I can still use Tree tabs. It’s very close to what I used to do with pentadactyl. This is freaking awesome.
Works the same way as with pacman. Interesting that I never thought about this. sudo pikaur -Syu
Updated startup.sh
to use redshift with a warmer nighttime temperature:
redshift -l 51.34:12.38 -t 6500:3000
Also I’m not sure I like the use -l
both for location provider and lat/long info. I think I understand the logic, but still..
If you never heal from what hurt you, you’ll bleed on people who didn’t cut you
# I need to add
markdown="1"to all HTML tags where I want to write markdown. This one is inside a child without the setting.
print("hello world!")
Got this from here
I should look into markdown options which would allow me to do more flexible CSS – and I could create a vim mapping to make them quick.
Updated the script to create a markdown dtb file to the following:
FILE=_posts/$(date +%Y-%m-%d)-day$(date +%j).markdown
DATE=$(date +%Y-%m-%d\ %H:%M:%S\ +0100)
if test -f "$FILE"; then
vim $FILE
exit 1
fi
echo "Creating file $FILE"
touch $FILE
echo "Adding stuff"
/bin/cat <<EOM >> $FILE
---
layout: post
title: "Day $(date +%j)"
date: $DATE
categories: []
---
EOM
vim $FILE
Now it’s closer to create_or_open.sh and doesn’t overwrite anything if run again by error, doesn’t add any unused parts, and opens the file if it exists already.
if test -f "$FILE"; then
vim $FILE
exit 1
fi
exit 1
or whatever status code.
SO:
command > /dev/null 2>&1
redirects both stdout and stderr to /dev/null;
command &> /dev/null &
works for me too, though it may not work in all shells.
command > /dev/null
still shows errors.
Added to anki everything until this page on the pro git ebook
After another small pause, here comes another längliches post!
I had been trying to get urxvt to play with i3 scratchpads, but when I set the -name
setting I got a vanilla URxvt look.
You evidently configured the font for a specific application instance rather than for an application class. (SO). To make your settings always apply, set
URxvt.font
rather thanurxvt.font
, etc.
Solved my problem.
Though at the end, I spent some time looking for a way to grep “name” instead of “class” for URxvt in bspwm
and gave up, now typing this on a st
terminal and loving every second of it!
Is the terminal I might start to use everywhere.
In config.h
I changed the font to be static char *font = "DejaVu Sans Mono:pixelsize=12:antialias=true:autohint=true";
Decided to give it a try, loving it!
To implement the scratchbox, used the method described in the Arch wiki.
In bspwmrc
,
t -c scratchterm & bspc rule -a scratchterm sticky=on state=floating hidden=on
In sxhkdrc
,
super + minus ~/s/scratch
In ~/s/scratch
,
#!/usr/bin/env bash
id=$(xdotool search --class scratchterm | head -n 1)
echo $id
if [ "$id" != "" ]
then
bspc node "$id" --flag hidden -f
fi
I added |head -n 1
so it can better deal with possible multiple terminals of this class, in case I have to restart bspwm for whatever reason.
Like a bad partner, the computer’s systems went crazy then stopped communicating with me.
I’ve become very isolated. When you’ve been to the Moon, you can only talk to astronauts.
The Copenhagen Interpretation of Ethics says that when you observe or interact with a problem in any way, you can be blamed for it. At the very least, you are to blame for not doing more.
The program was helping as many people as it could, the only change was explicitly labeling a number of people it wasn’t helping as a “control group”. The response?
“They should immediately stop this experiment, ” said the Manhattan borough president, Scott M. Stringer. “The city shouldn’t be making guinea pigs out of its most vulnerable.”
Didn’t have to do this a long time:
makepkg -Acs
sudo pacman -U x.pkg.tar.xz
This describes amongth other things block-level stuff for Markdown. This is potentially a solution for different footnotes and various other small design tweak I’d like to have on this blog. I can just add a CSS class and then in CSS see what I want to do with it.
git diff HEAD^^ HEAD file.md
– where HEAD^^ is “two revisions back”.
Also the option --compact-summary
gives number of insertions and deletions.
It’s an interesting thing to research someday. This discussion and similar ones can be a reference, along with looking at the graphs and targeting 80% retention.
In general I really should invest an hour or so to learn everything about Anki, so far it’s been the single most effective tool I have for my memory but am using it on a default and primitive level.
For now I changed Steps to “1 10 60” and “10 60”, new interval to 30%.