Skip to content

Instantly share code, notes, and snippets.

View teroyks's full-sized avatar

Tero Ykspetäjä teroyks

View GitHub Profile
@teroyks
teroyks / Activate Env.md
Last active January 20, 2022 10:43
Activate venv somewhere in the directory tree

Find and Activate venv

Tries to find and activate a virtual environment either in the current directory or the closest one in the hierarchy.

Example:

  • in /foo/bar/baz
  • first, checks if /foo/bar/baz/venv/bin/activate is found (and uses that if it is)
  • next, tries /foo/bar/venv/bin/activate
  • after that, /foo/venv/bin/activate
@teroyks
teroyks / nitter_bookmarklet.js
Last active September 18, 2023 14:46
Redirect a Twitter URL to Nitter
javascript:(() => { const nitter_instance = 'nitter.net'; const current_url = window.location.href; window.location.href = current_url.replace(/(mobile\.)?twitter\.com/, nitter_instance); })();
@teroyks
teroyks / .gitignore
Last active April 25, 2023 12:03
Quarto Makefile
/.quarto/
/_book/
/.render-timestamp
@teroyks
teroyks / README.md
Last active January 11, 2024 14:21
GitHub Colorize Project View

GitHub Colorization Bookmarklet and Custom Style

A bookmarklet for visualizing different card types in the GitHub project view better.

To create the bookmarklet, use a minifyer (like Minify for VS Code), or a tool like Bookmarklet builder.

Add the minified code as a bookmarklet (start with javascript:).

Alternatively, use the custom style file with e.g. Stylus. This is the preferred option if you’re able to install an extension to the browser (the bookmarklet requires activation every time but does not require installing anything).