Skip to content

QubitPi/reusable-bash-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reusable Bash Scripts

Apache License Badge

Cleaning all local docker containers, images, and volumes

curl -sL https://raw.githubusercontent.com/QubitPi/reusable-bash-scripts/refs/heads/master/docker-clean.sh | bash

Add Paddings to Image

Adds paddings of an image to make it with certain dimension. To use this script, install ImageMagick first. For example, on Mac, install by

brew update
brew install imagemagick

Tip

To install this script, place it under OS executable path. For example, On mac put this under "/usr/local/bin/"

The following examples assumes the input image is "input.png" and output image will be "output.png":

  • Add transparent paddings to make a square image with the side being the larger one of original's width or height:

    curl -sL https://raw.githubusercontent.com/QubitPi/reusable-bash-scripts/refs/heads/master/add-padding.sh | bash -s -- input.png output.png 
  • Add transparent paddings to make an image with dimension 1920x1080:

    curl -sL https://raw.githubusercontent.com/QubitPi/reusable-bash-scripts/refs/heads/master/add-padding.sh | bash -s -- input.png output.png 1920x1080
  • Add paddings, whose color is #00CC00, to make an image with dimension 1920x1080:

    curl -sL https://raw.githubusercontent.com/QubitPi/reusable-bash-scripts/refs/heads/master/add-padding.sh | bash -s -- input.png output.png 1920x1080 #00CC00

Keeps Executing A Command Util it Succeeds

curl -sL https://raw.githubusercontent.com/QubitPi/reusable-bash-scripts/refs/heads/master/loop.sh | bash -s -- <command>

License

The use and distribution terms for reusable-bash-scripts are covered by the Apache License, Version 2.0.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages