Skip to content

Instantly share code, notes, and snippets.

Virtualenv's bin/activate is Doing It Wrong

I'm a Python programmer and frequently work with the excellent [virtualenv][] tool by Ian Bicking.

Virtualenv is a great tool on the whole but there is one glaring problem: the activate script that virtualenv provides as a convenience to enable its functionality requires you to source it with your shell to invoke it. The activate script sets some environment variables in your current environment and defines for you a deactivate shell function which will (attempt to) help you to undo those changes later.

This pattern is abhorrently wrong and un-unix-y. activate should instead do what ssh-agent does, and launch a sub-shell or sub-command with a modified environment.

Problems

@lyndsysimon
lyndsysimon / protonmail_archiver.js
Last active October 25, 2023 21:34 — forked from apazzy/protonmail_archiver.js
Protonmail inbox cleaner
/* Protonmail cleanup scripts
* Works with ProtonMail v4.0.14 as of 2022-01-23
*
* Based on Lyndsy's Protonmail mass archiver:
* https://gist.github.com/lyndsysimon/e6a4a1becaddf09fe02c503793b545d6
*
* Usage:
* - Navigate to your inbox (or another folder/label, presumably)
* - Open your browser's developer tools' Javascript console
* - Paste in this script