Handy snippets I always forget
This post is a place for useful snippets which I use semi-regularly, but not often enough to have them memorized, and regularly have to go back and find them.
How to activate conda environment with direnv
As you know, I like direnv to make things easier for me, by automatically setting things up whenever I enter a directory. There are a number of ways to get direnv to automatically activate a conda environment, but here's one of the simplest – just add this to your .envrc file:
eval "$(conda shell.bash hook)"
conda activate <env-name>
Source:
How to run a python module and automatically go into pdb on exceptions and breakpoints
ipython --pdb -m <module> -- <other args>
Source:

How to push to a new branch without --set-upstream...
You create a new branch, and then go to push it, and get hit with "you can't do that, because we have no idea what you want us to do" one too many times?
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master:(
Run this command to set up your git config to automagically create a new remote branch to match the local one your pushing, and set your local branch to track the new remote one:
git config --global push.default current
Then, whenever you got to push a new branch, just do git push -u
Source:

How to send a file/directory/message between computers
This one doesn't really fit with the others, because it's very easy to remember, but may not be well-known as it should be. Just use Magic Wormhole.
On one machine:
wormhole send <file/files/message>
For example:
$ wormhole send test.txt
Sending 6 Bytes file named 'test.txt'
Wormhole code is: 6-decadence-commence
On the other computer, please run:
wormhole receive 6-decadence-commence
One another machine, with no prior setup other than installing magic wormhole
$ wormhole receive 6-decadence-commence
Receiving file (6 Bytes) into: test.txt
ok? (y/N): y
Receiving (->relay:tcp:magic-wormhole-transit.debian.net:4001)..
100%|██████████████████████████████████████████████████████| 6.00/6.00 [00:00<00:00, 35.7kB/s]
Received file written to test.txt
