Skip to content

Instantly share code, notes, and snippets.

View loleg's full-sized avatar

Oleg Lavrovsky loleg

View GitHub Profile
@loleg
loleg / gist:7458a26da3bfcd803b5ed9f7b16d5231
Created October 29, 2016 09:38 — forked from schacon/gist:1
the meaning of gist
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.
@loleg
loleg / conda.fish
Last active December 8, 2017 12:37 — forked from jiffyclub/conda.fish
Activate and deactivate commands for working with conda environments in the fish shell. Currently assumes you are switching to a named environment, not specifying a directory.. Adapted from https://penandpants.com/2014/02/28/using-conda-environments-and-the-fish-shell/
# To use this, add to the ~/.config/fish/ directory and source them from
# the end of the ~/.config/fish/config.fish file:
#
# source $HOME/.config/fish/conda.fish
#
# set this to YOUR anaconda/miniconda path:
set CONDAHOME $HOME/miniconda3/envs
function condalist -d 'List conda environments.'
for dir in (ls $CONDAHOME)
@loleg
loleg / santa.py
Created December 6, 2020 10:21 — forked from will-bainbridge/santa.py
Secret Santa script
#!/usr/bin/python3
"""
Ye olde Secret Santa script based on https://gist.github.com/will-bainbridge/a4666a196fb5833cf37035647b74c064
You will need to prepare a "people file", which is in CSV format (UTF-8, comma delimited) and has the following columns (without a header row)
Name, E-mail, Extra content 1, Extra content 2
We used the postal address as extra content 1 and a link to Google Street View as extra content 2. Then you can specify a plain text message file which includes %s for the buyer name, recipient name, recipient extra 1, and recipient extra 2 (in that order!). For example: