Some CLI stuff
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
.editorconfig
.gitignore
README.md
csv_to_jsonl.py
delayed.py
format_yaml.py
instant_apache.py
instant_mongodb.py
instant_mysql.py
json_prettify.py
jsonl_sort_keys.py
jsonl_to_yaml.py
macos_ramdisk.py
markdown_live_preview.py
mongo_overview.py
mongo_pretty_dump.py
myip.py
pararun.py
remove_docker_images.py
rename.py
requirements.txt
spf_check.py
trim.py
watch_files.py
word_diff.py
xwatch.py

README.md

Useful tools

There are some utilities I use.

Overview

instant_apache

Create configuration and run Apache webserver with document root in current or given directory.

instant_mongodb

Run MongoDB server instance.

instant_mysql

Run MySQL server instance. You need to bootstrap it before first use (run with --bootstrap).

mongo_overview

Gives overview what databases and collections are contained in your MongoDB. With argument -s it also analyzes and prints document structure.

mongo_print

Dump all documents from MongoDB.

pararun

Run commands in parallel.

$ ./pararun.py echo foo :: echo bar
[echo] foo
[echo] bar

trim

Trim excessive whitespace from line ends in text files.

xwatch

Run one command repeatedly, separate outputs with blank lines.

This is an alternative to the watch command, but the fullscreen-like behavior is done with blank lines, so the output can be easily scrolled.

Installation

There is no setup.py. I personally checkout this repository in ~/code/tools. You have more options how to run these tools easily from command line:

  • Add the directory to $PATH
  • Symlink some or all files to /usr/local/bin
  • Use alias or shell function

For example - adding to $PATH in ~/.bashrc:

if [ -d ~/code/tools ]; then
    PATH=$PATH:~/code/tools
    export PATH
fi

Versioning

I've created branch v01 where should be introduced no backward-incompatible changes. Sometimes I include these tools in a project so it is better to include a specific version branch than master.