/homebrew-bin

My personal scripts for installation via brew tap (http://brew.sh)

Primary LanguageShellMIT LicenseMIT

homebrew-bin

My personal scripts for installation via brew tap (http://brew.sh)

Requirements

Installation

Tap this repository:

$ brew tap rogeriopradoj/bin

Binaries

Notify

Notify from your Terminal (iTerm2) using terminal-notifier

Installation

$ brew install rogeriopradoj/bin/notify

Usage

$ something-time-consuming; notify              #notifies: Done
# or
$ something-time-consuming; notify "a message"  #notifies: a message

Utf8

Create a utf8 version of any file, prepending a _ (underline) in the generated file

Installation

$ brew install rogeriopradoj/bin/utf8

Usage

$ utf8 text.txt # not-utf8, i.e. iso-8859-1
# DONE
#
# Final Encoding: utf-8
# Final file: _text.txt
# Original Encoding: iso-8859-1

Upall

Update and upgrade [oh-my-zsh], [homebrew], [cask], [mas], [composer]

Installation

$ brew install rogeriopradoj/bin/upall

Usage

$ upall
# upall: [oh-my-zsh] Upgrading
# .
# upall: [homebrew] Updating
# .
# upall: [homebrew] Upgrading all formulas
# .

FixAppCatalinaDosDude

Fix broken .apps in Catalina OS patched with Dosdude tools

Installation

$ brew install rogeriopradoj/bin/fix-app-catalina-dosdude

Usage

$ fix-app-catalina-dosdude -a applicationName
#Example: ./bin/fix-app-catalina-dosdude -a "Google Chrome"
#Password:
#/Applications/Google Chrome.app: replacing existing signature

Fixappall

Run fix-app-catalina-dosdude in several apps in a row

Installation

$ brew install rogeriopradoj/bin/fixappall

Usage

Ensure that you have a $HOME/.fixappall file (POSIX-like), filled with app names, one by row, that will be fixed, i.e.:

Google Chrome
Microsoft Teams
Microsoft Edge
LastPass
Brave Browser

In the end, run:

$ fixappall
# Password:
# /Applications/Google Chrome.app: replacing existing signature
# /Applications/Microsoft Teams.app: replacing existing signature
# /Applications/Microsoft Edge.app: replacing existing signature
# /Applications/LastPass.app: replacing existing signature

OcrImageToTxt

Extract using ocr text from a image

Installation

brew install rogeriopradoj/bin/ocr-image-to-txt

Usage

$ ocr-image-to-txt
#    > Total images: 1
#    .
#        > Image source: /Users/rogeriopradoj/contribs/homebrew-bin/Comprovante_2019-05-01_110608 copy.jpeg
#        > Txt output: Comprovante_2019-05-01_110608 copy.jpeg.txt
#    .
#    Tesseract Open Source OCR Engine v4.0.0 with Leptonica
#    Warning: Invalid resolution 0 dpi. Using 70 instead.
#    Estimating resolution as 321
#
#    DONE
# ---
# or
# ---
#    > Total images: 0
#    .
#        > No image files in this folder, /Users/rogerio/contribs,
#        >   using pattern, @(*.jpg|*.jpeg|*.png)
#    .
#
#    DONE
#

Gitupdate

Git: Checkout to main branch, pull from upstream repo and prune staled branches

Installation

$ brew install rogeriopradoj/bin/gitupdate

Usage

$ gitupdate
# checkout to main branch
#   Switched to branch 'master'
#   Your branch is up to date with 'origin/master'.
#
# pull from origin
#   ..
#   Fast-forward
#
# fetch pruning