Skip to content

Instantly share code, notes, and snippets.

View FredericoFavaro's full-sized avatar

Frederico Fávaro FredericoFavaro

View GitHub Profile
@peterrus
peterrus / gnome3_keybind_backup.sh
Last active October 18, 2023 05:58
Backs up and restores gnome3 keybindings
#!/usr/bin/env bash
# Backs up and restores gnome3 keybindings
# Tested with Gnome 3.36.8
# by peterrus
set -e
mkdir -p gnome3-keybind-backup
@henriquebastos
henriquebastos / 00-detect-virtualenv-sitepackages.py
Last active October 17, 2022 04:22
IPython startup script to detect and inject VIRTUAL_ENV's site-packages dirs.
"""IPython startup script to detect and inject VIRTUAL_ENV's site-packages dirs.
IPython can detect virtualenv's path and injects it's site-packages dirs into sys.path.
But it can go wrong if IPython's python version differs from VIRTUAL_ENV's.
This module fixes it looking for the actual directories. We use only old stdlib
resources so it can work with as many Python versions as possible.
References:
http://stackoverflow.com/a/30650831/443564