Skip to content

Instantly share code, notes, and snippets.

View jakob1379's full-sized avatar

Jakob Stender Gulberg jakob1379

View GitHub Profile
@jakob1379
jakob1379 / cow.sh
Created December 17, 2024 14:21
simple command to add cowsay in rainbows to .profile with fullpaths to ensure they always work
pip install lolcat cowsay && echo "$(which cowsay) -t \"When you do not close the door, cows will drop by, muh\!\" | $(which lolcat) -a -s 200" >> ~/.profile
@jakob1379
jakob1379 / setup_logging.py
Last active October 22, 2024 08:05
Simple setup for beautiful logging using Rich
import logging
import os
from logging.handlers import RotatingFileHandler
from typing import Literal
from rich.logging import RichHandler
def setup_logging(
log_file: str = None,
@jakob1379
jakob1379 / i3-2-sxhkd
Last active January 2, 2020 13:05
A small script to migrate i3 keybinding to sxhkd
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# name: i32sxhkd
# converts i3-config syntas to sxhkd
# argument 1 - full path to config file
# expected input/output - i32sxhkd [FILE] -> converted output
# example suggested usage: i32sxhkd filename > outputfile
@jakob1379
jakob1379 / pyenvdir
Created December 19, 2019 09:32
An extension for pyenv virtualenv to instantiate a virtual environment and associate the local folder with the same virtual environment
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
displayUsage() {
echo '
An extension for pyenv virtualenv to instantiate a virtual environment and
association of the local folder with the same virtual environment
usage: pyenvdir [pyver] <name>
operations: