In the middle of the desert you can say anything you want
Added config.bind('tw', 'set-cmd-text -s :open -w')
to config, now tw
is like a
, but for windows instead of tabs.
Added this macro:
let @R = 'viw"oyi[^^[^[^[^[A]^[^[^[Go[^^[^[^[^["opA]: ^[^[^[^['
When the last word in the line is selected, it gets transformed immediately to a reference. I’ll use this vim cheatsheet as 1.
Vim cheatsheetVim cheatsheet
As a bonus, this uses a non-default vim register so whatever is in my clipboard stays there. (But it destroys whatever I had in "o
). ↩︎
Mafia distributes food to Italy’s struggling residents
In recent days, the police in Naples have intensified their presence in the poorest quarters of the city, where men tied to the Camorra, the Neapolitan mafia, have organised home delivery of food parcels. Magistrates have already begun an investigation against a group of people who were questioned while distributing food to local residents.
The Science of Happiness | Greater Good is a podcast about happiness, found it while looking for The Happiness Lab which is also a podcast about happiness.
Screens named with screen -S myname
and attached by screen -r myname
- tab completion works with screen -r
!
entry
is the time the task was created. So:
task all sprint:$SPRINT status:pending entry.before:eow-3wk tags.not:s rc.report.all.columns:entry,end,tags,description rc.report.all.labels=Age,Done,Tags,Description rc.report.all.sort:end rc.verbose:label,blank
is what I’ll use in SIOM.
I missed this all my life.
If more than 1 GPU are visible, tensorflow will take some memory on all of them, even if its actively using only one. Restricting visibility the usual way helps.
task all status:completed end.after:eow-2wk
– I forgot you could do almost-math with the datetimes!
Editing the output, to sort it by project, divide different ones by newlines, and show the headers of the table but nothing else:
task all status:completed end.after:eow-2wk rc.report.all.columns:project,entry,end,tags,description rc.report.all.labels=Project,Created,Finished,Tags,Description rc.report.all.sort:project-/,end rc.verbose:label
This is a really nice video: How to Make Perfect Pizza | Gennaro Contaldo - YouTube
Using an userscript for this is overkill, but
#!/usr/bin/python3
import os
title = os.environ['QUTE_TITLE']
url = os.environ['QUTE_URL']
with open(os.environ['QUTE_FIFO'], 'w') as f:
f.write("yank inline \"[{} {}]\"".format(url, title))
Located at /home/shamotskyi/.local/share/qutebrowser/userscripts/yank_w.py
.
In the config, config.bind('yw', 'spawn --userscript yank_w.py')
EDIT: replaced this with config.bind('yw', 'yank inline "[{url} {title}]"')
.
I have not been using it to the fullest.
List tasks completed today: task all status:completed end:today
This might be something I can copypaste into my pages or in my reports, such as my weekly sprint review! Adding it as a module to siom
should be not too hard. Taskwarrior - Usage Examples contains more nice examples.
glob is not sorted!
glob.glob().sorted()
though is.
kitty - the fast, featureful, GPU based terminal emulator — kitty 0.17.2 documentation:
ctrl+shift+s
is paste from selection
ctrl+shift+u
for unicode characters
sudo update-alternatives --config x-www-browser
Doesn’t seem to work for kitty, but in the config open_url_with qutebrowser
works predictably.
gratuitous - Wiktionary - given freely, unearned; without reason, unjustified, unnecessary, uncalled for. Seen first in Behemoth by Peter Watts.
For the sake of consistency (to each other and especially to Google Calendar) now my sprint number and week number is the ISO week number:
export SPRINT=$(date +%-V)
Fixed this in:
tztime local {
format = "[%V] %a %Y-%m-%d %H:%M:%S"
}
Only place it’s left now is in my paper calendar, but I don’t use it too much these days.
balmy - Wiktionary - soothing, fragrant, mild, pleasant. Found in Behemoth by Peter Watts.
I should check vim modelines (Vim documentation: options) out, systematically.
Try adding cauliflower in my pasta water 1
And pasting my favourite Reddit comment for posterity:
[deleted] 385 points · 1 year ago · edited 1 year ago
This isn’t wrong, but not the tradition Italian way. The way we do it in Italy (Sicily) is to split the sauce in half. Take the pasta out about a minute or less before al dente. If you’re going for the creamy flavor, sauce permitting, mix some butter with the pasta as you’re draining the water. Then put the pasta in the sauce pan with half of the sauce and a (tiny) bit of pasta water. 1/4 of a cup is too much in our opinion because you don’t want to cook the pasta in the sauce for too long. Use the other half of the sauce to top it off. That’s not to say this is the only way Italians do it, but my Southern Italian family has been using this method for generations. I’m not a fan of OP’s method, if you want this kind of pasta just make a cacio e pepe.
On a separate but related note, tomato sauces (without meat) should only be cooked for 30 minutes, after that they lose the aroma. Of course I’m biased, but a simple tomato sauce is one of the easiest and most delicious things in the world to make. Simmer garlic until sizzling (add red pepper flakes with garlic for arrabbiata) add decent plum tomatoes (buy whole ones and hand crush them) with S&P, basil, oregano. You can add some butter if you like. Stir occasionally, 30 minutes later you’re done.
Edit: I always used to laugh to myself when I saw people getting excited about getting their first gold, and now I’m that person. Thanks kind stranger. 2
You can freeze bread without problems:
He starts with what not to freeze: “I never recommend freezing things like baguettes or ciabatta. Anything that has a large surface-to-crumb ratio just never refreshes the same.” 3
If baking, let your bread cool completely. This will prevent it from becoming soggy or moldy. Wrap each loaf tightly in plastic wrap. Then wrap it in foil or freezer paper. The double-wrap is your secret weapon for freshness.4
Unfreezing works overnight in the refrigerator. 4
While I’m at it, the yeast ratio is 2 1/4 teaspoons dry active, instant, or rapid-rise yeast granules (usually one 1/4-ounce packet) = 2/3 ounce fresh yeast 5
If I do annotations / sources / references, I have to put the definition on a new ’new’ line, so it’s a new block. This was my error back at the very beginning. Not one
Vim macro to create an reference based on a selected line.
What’s the deal with Italians not combining onion and garlic in dishes…? : Cooking ↩︎
LPT: If you like a lot of Parmesan cheese on your pasta, put it on the pasta and mix it around before you cover it in the sauce. Every noodle will be coated in cheese and covered in sauce. It will change your life. : LifeProTips ↩︎
Can You Freeze Bread? Yes, Here’s How. | Taste of Home ↩︎ ↩︎
Does Fresh Yeast Make a Difference When Baking Bread? | Kitchn ↩︎
config.bind('E', 'set-cmd-text -s :edit-url')
added to config.py
allows me to press E and the command will be prefilled.
Interesting arguments 1:
-b, --bg: Open in a new background tab.
-t, --tab: Open in a new tab.
-w, --window: Open in a new window.
-p, --private: Open a new window in private browsing mode.
Made the following changes and bumped the version to v5:
// Changing aoeu for umlauted letters
key <AC01> { [ a, A, adiaeresis, s] };
key <AC02> { [ o, O, odiaeresis, n] };
key <AC03> { [ e, E, ediaeresis, t] };
key <AC04> { [ u, U, udiaeresis, u] };
// Adding ~` to the better key for this
key <AD01> { [ apostrophe, quotedbl, grave, asciitilde] };
key <AD02> { [ comma, less, r, asciitilde] };
// Adding parentheses in a better place
key <AD08> { [ c, C, Up, parenleft ] };
key <AD09> { [ r, R, BackSpace, parenright ] };
key <AD07> { [ g, G, bracketleft, braceleft ] };
key <AD10> { [ l, L, bracketright, braceright] };
// Numbers!
key <AB01> { [ semicolon, colon,1, exclam] };
key <AB02> { [ q, Q, 2, at ] };
key <AB03> { [ j, J, 3, numbersign ] };
key <AB04> { [ k, K, 4, dollar ] };
key <AB05> { [ x, X, 5, percent ] };
key <AB06> { [ b, B, 6, asciicircum] };
key <AB07> { [ m, M, 7, ampersand] };
key <AB08> { [ w, W, 8, asterisk] };
key <AB09> { [ v, V, 9, asterisk] };
key <AB10> { [ z, Z, 0, asterisk] };
// A new delete key
key <AC06> { [ d, D, KP_Delete, asterisk] };
Now I have brackets on my right hand letters :) I’ll think later what other symbols I still have not learned by heart and move the below. (Numbers, maybe?)
Updated the userscript to the following, now it removes stuff Mediawiki doesn’t like from the name of the page (but not from the Title, which is not part of the URL!)
#!/usr/bin/python3
import os
from urllib.parse import quote_plus
def urlencode(string):
return quote_plus(string)
def replace(original):
new = original.replace("|", "-")
return new
def replace_name(original):
new = original.replace("|", "-")
new = new.replace("[", "(")
new = new.replace("]", ")")
new = new.replace("#", "(hash)")
new = new.replace("{", "(")
new = new.replace("}", ")")
new = new.replace("_", " ") # TODO test
return new
title = os.environ['QUTE_TITLE']
url = os.environ['QUTE_URL']
selected_text = os.environ['QUTE_SELECTED_TEXT']
newTitle = replace(title)
newArticleName = replace_name(title)
newUrl = replace(url)
newText = replace(selected_text)
print(newTitle)
article_title = urlencode(newTitle)
article_name = urlencode(newArticleName)
page_url = urlencode(newUrl)
selected_text = urlencode(newText)
fiammaUrl = 'https://pchr8.net/f/index.php'
url = fiammaUrl+'?title='+article_name+'&action=edit&preload=Template:NewLink&preloadparams[]='+page_url+'&preloadparams[]='+article_title+'&preloadparams[]='+selected_text
with open(os.environ['QUTE_FIFO'], 'w') as f:
f.write("open -w {}".format(url))
This is a nice wikipedia page that starts with “Q.” and not with “Q:”, because “Q:” is forbidden as start of page name: Q. Are We Not Men? A: We Are Devo! - Wikipedia
I’ll try to do this tomorrow: The Best Pizza Dough Recipe - Sugar Spun Run
For when I get to this, it’s easy, after I install matterhook
:
>>> mwh = Webhook('https://chat.mycompany.de', 'myAPIhook')
>>> mwh.send('test',channel='notif')
Very nice explanation here: GitHub - numberly/matterhook: Interact with Mattermost incoming webhooks easily.
Say I’m in folder2 and want to run folder2/folder/main.py
python3 -m folder.main
adds folder2 to $PATH
, while python3 folder/main.py
adds folder
to $PATH
. The first option makes all imports much much easier.
To set a name to a screen session to make attaching it easier, you either set it as parameter during screen creation (screen -S screenname
) or set it from inside an attached screen by typing <C-a> :sessionname screenname
. It will look like that:
There are several suitable screens on:
74720.trying_to_run_GPU (03/28/20 00:33:28) (Attached)
70666.whatisthis (03/28/20 00:20:53) (Detached)
(Setting a name for a screen session - Unix & Linux Stack Exchange)
To attach it I can use only its name: screen -raAd whatisthis
TODO actually read the man pages and have a better understanding of these flags instead of treating them like incantations.
watch
command set interval and highlight changesThis is nice! To watch a file grow in size, except watch ls -lar
you can do watch -d -n 1 ls -lar
. -d
makes it highlight the differences, and -n
for some reason is the interval. (-i
was taken I guess).
I keep googling this, so:
export CUDA_VISIBLE_DEVICES=2
And to set an environment variable before running the script (in bash at least) it’s TEST=foo; echo $TEST
(shell - How do I set an environment variable on the command line and have it appear in commands? - Unix & Linux Stack Exchange). export
is just to make it available for other commands.
It’s quite cute how google interprets me looking for kitty paths linux
as cat paths linux
, as in I believe that they are kinda similar in many contexts.
That said, it’s very refreshing to see a program where reading the config file documentation on its official website doubles as basic tutorial for the program, since all the keyboard shortcuts used in the example config are the real ones.
Not sure why this surprises me, but I can first start a SSH shell that does a tunnel (.. and opens a SSH shell), then from it start the thing on the port that I am tunnelling. This almost looks like something I could automate if I do it often enough.
ferine - Wiktionary - “pertaining to wild, menacing animals” - same in Italian. First seen here: Ninco Nanco - Wikipedia.
speiseöl | Übersetzung Englisch-Deutsch is basically any cooking oil.
If you want to learn more about the process and jump off the deep end, Peter Reinhart’s book “The Bread Baker’s Apprentice” is a great place to start. It is detailed without being pedantic, simple without being over-simplified, and oriented for the home baker without forgetting the reasons that professionals do things the way they do.
Why do you need to refrigerate bread dough overnight? - Seasoned Advice