Skip to content

Instantly share code, notes, and snippets.

@louiskounios
louiskounios / flatten_directory.py
Last active January 3, 2019 10:12
Python script that flattens a directory without overwriting files that share a name. Takes absolute path to directory as input.
#!/usr/local/bin/python3
# Script that flattens a directory without overwriting files that share a name.
# Takes absolute path to directory as input.
#
# All files in any subdirectory of the user-provided directory, regardless of
# depth, are moved to the user-provided directory. When filenames clash,
# special care is taken by adding a counter to the filename (e.g., '_001').
#
# Linux only. Tested only on Python 3.7. Minimum version is 3.6.
@louiskounios
louiskounios / exa-config.sh
Last active April 10, 2022 08:38
exa useful aliases, and EXA_COLORS (/ LS_COLORS) config
alias ls='exa --classify --across'
alias l='exa --classify --oneline'
alias ll='exa --classify --long --group'
alias llg='exa --classify --long --grid --group'
alias tree='exa --classify --tree'
# When --long --grid are used at the same time, --grid will only apply if the
# resulting output will be at least EXA_GRID_ROWS long.
export EXA_GRID_ROWS=3