This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$current_dir = Get-Item -Path '.' | |
$input_dir = "$($current_dir.FullName)\images" | |
$output_dir = "$($current_dir.FullName)\output" | |
New-Item -ItemType Directory -Path $output_dir | |
$file_names = Get-ChildItem -Path $input_dir -Recurse | ForEach-Object { $_.FullName } | |
$output_file_names = Get-ChildItem -Path $output_dir -Recurse | ForEach-Object { $_.FullName } | |
$max_threads = 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List and open books from your calibre library using bash | |
# ----------------- | |
# Requirements: | |
# sqlite, jq, fzf, fd | |
# ----------------- | |
# Put this function inside your ~/.bashrc or ~/.zshrc, | |
# source the ~/.bashrc or ~/.zshrc file or restart the terminal, | |
# then type `books` to use the function. | |
function books { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias venva='git_venv_activate' | |
git_venv_activate(){ | |
GIT_TOPLEVEL_DIR=`git rev-parse --show-toplevel 2> /dev/null` # get absolute path of the top-level directory of the working tree | |
if [ -z "$GIT_TOPLEVEL_DIR" ]; then | |
echo "Execute inside a git repository" | |
else | |
source $GIT_TOPLEVEL_DIR/.venv/bin/activate | |
fi | |
} |