GithubHelp home page GithubHelp logo

mini-utils's Introduction

mini-utils

A repository for simple command-line utilites that I've made for myself, but am happy to share with the world.

The quality of the scripts and documentation varies. If you don't find something useful, don't use it.

This is what each utility in the repository does:

  • ec2-ssh-config.sh: a tool to add a setting to the ssh config file for Amazon's EC2 IP addresses, so that it will automatically use an ec2-specific identity file for any of them. Uses wget to download a json file from Amazon with a list of their ip subranges, jq to parse out the subnets used for ect, and creates an entry in ~/.ssh/config

    • depends: grepcidr, jq, wget
  • usb_boot: a simple python wrapper to let you use QEMU to test a bootable USB drive using the technique documented in this article on coderwall.com, and calling the commands with the python subprocess module.

    • depends: python (>=3.5), qemu-system-x86_64, qemu-kvm optional, can use without kvm with lowered performance, sudo
    • note: QEMU requires root permissions to have write access to the usb drive, and will not boot it without that. I would encourage anyone who wants to use this script to read it over before running it, given that it creates a subprocess with root-level permissions using sudo.
  • remove-color-escapes, show-color-escapes: pure python tools to remove or show color/text formatting ANSI escape seqences (specifically those that match the regular expression '\x1b\\[[0-9;]*m').

  • setup-sandbox.sh: creates a simple sandboxed X11 environment to run a command in.

    • usage: setup-sandbox.sh /path/to/sandbox/homedir command-to-run command-args*
    • depends: Xephyr (an optional part of Xorg), Bubblewrap (a sandboxing tool), and awesome (a lightweight window manager)
  • spipx is a wrapper around the pipx utility that, when run as root, creates the venvs and other such data in /opt/pipx, and installs the binaries to /opt/pipx/bin

    • depends: pipx
  • cmark-gfm-heading-generator is an AWK script that adds headings to the output of cmark-gfm. It specifically requires support for the \uHH escape sequence, which is non-standard, so it requires at least the onetrueawk 2ndEdition release or GAWK 5.3.0, both of which are too new to be included in Debian Bookworm - I compiled them from source. It breaks if LC_ALL is set to certain values โ€” on my system, which has the C, C.utf8, en_US.utf8, and POSIX locales, it only worked if the LC_ALL environment variable was either unset or set to C.utf8 or en_US.utf8. The shebang depends on specific GNU env functionality too, but you can invoke it directly or edit the shebang to get around that.

    • usage: cmark-gfm some-markdown-file.md | cmark-gfm-heading-generator > index.html
    • depends: gawk >= 5.3.0 or onetrueawk >= 2ndEdition, utf8 locale

mini-utils's People

Contributors

eliminmax avatar

Stargazers

 avatar

Watchers

 avatar

mini-utils's Issues

Files have redundant copyright info

When starting to follow the REUSE specification, I accidentally left in the old copyright lines in the following files:

  • spipx
  • ec2-ssh-config.sh
  • setup-sandbox.sh
  • cmark-gfm-heading-generator

Minor issue, but might as well clean that up.

usb_boot ignores --nokvm flag

--nokvm/-nokvm/-K should set args.use_kvm to false. Instead, it sets args.kvm to false, resulting in QEMU attemting to use it anyway, potentially causing it to crash if KVM is not available.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.