Skip to content

Releases: oldratlee/useful-scripts

🐌 v3.0.0-Alpha: a WIP/cleanup release

15 Apr 12:07
Compare
Choose a tag to compare

repo-icon

Note

This is a WIP/cleanup release for upgrading version to 3.x

  • remove legacy bin 🚮
  • rename dir test-cases to test 🆙

It's time to say goodbye, legacy bin my friend

It's been a long day without you my friend
And I'll tell you all about it when I see you again
We've come a long way from where we began
Oh I'll tell you all about it when I see you again


Have Fun! 💕
2024-04-15

🐌 v2.5.4 🍬🎰

12 Apr 05:47
Compare
Choose a tag to compare

repo-icon

☘️ Features

  • [c]: ensure using command on PATH, and check the command existence on PATH 👣
  • [coat/taoc]: add --help/--version options 🚩

🍬 Improvements

  • [find-in-jars]: add IFS= for read, more robust 💪
    • file paths may contain leading spaces
  • [show-busy-java-threads]:
    • improve separator blank line output 💅 fix wrong blank line logic
    • extract timestamp var to avoid inconsistency ⌚️
  • unify error message format and refactor related functions ℹ️
    • keep usage function simple
    • use -s/-h option for optional argument of die function
  • use ${var##*/} instead of basename to assign PROG var 🎛️
    • faster, no subprocess fork
  • use command realpath instead of function portableReadLink 🔗
    • faster and without losing portability
  • use bash builtin type -P instead of which command, faster 🐚

🛠️ Refactor

  • [show-busy-java-threads]: rename global var USER -> WHOAMI 👤
  • [uq]: use exponential operation instead of multiplication to calculate size 🧮
  • [c]: rename functions 🔡
  • use Shell Arithmetic comparison instead of Conditional Expressions 🔢
  • use = instead of == in Conditional Expressions
  • use ||/&& instead of one branch/one line if 🎰
  • merge colorPrint function if only one caller
  • variable related refactors:
    • extract UNAME var 🔠
    • rename var, use COLOR_INDEX instead of COUNT
    • remove declare keyword for global vars, more consistent
    • use upper-case var name for global readonly vars
    • unset temp global vars after use
    • remove unnecessary {} when use var
    • remove local nl=$'\n' declaration if only one usage
  • small code cleanup
    • remove unnecessary file descriptor number 1 in redirections ➡️
    • remove section comments for simple section
    • improve/fix/add code comments

📚 Documentation

  • update manual pages links to manned.org 📚
  • use shellcheck item doc link instead of prolixity comments ✨

🚜 Build/CI

  • upgrade GitHub actions; add dependabot.yml 🤖
  • upgrade shunit2 lib

Have Fun! 💕
2024-04-12

🐌 v2.5.3 ☕️

18 Feb 05:05
Compare
Choose a tag to compare

repo-icon

🍬 Improvements

  • [show-busy-java-threads] support Java21 🆕 ☕️
    • missing stack on Java21, because Java21 changed the format of stack title line (issue #120 submmited by @jianyun)
  • [show-busy-java-threads] improve separator blank line output format 💅

Have Fun! 💕
2024-02-18

🐌 v2.5.2 🌗🐚🐈

24 Jan 18:05
Compare
Choose a tag to compare

repo-icon

🐞 BugFix

  • coat/taoc: missing last line if there’s no newline at the end of the file 🌗 🙀
  • xpl: wrong exit code when file not existed or open file failure 🔢

🛠️ Improvements/Refactor

  • find bash with /usr/bin/env in shebang (by @hyperupcall in #119) 🐚
  • coat/taoc: 🐈
    • remove pipe when naked cat(more straightforward and faster) 😸
    • extract colorLines function 🌈
  • a2l: merge function colorPrint into rotateColorPrint 🛠️
  • improve readability
    • remove var interpolation in printf format if possible
    • rename vars, e.g. message -> content, normal -> color_reset 👓
    • use \e instead of \033
    • improve comments for -t check
  • simplify var usage
    • remove unnecessary {} when use var
    • remove quote of values in simple assignment

🚜 Build/CI

  • upgrade shunit2 lib

Have Fun! 💕
2024-01-25

🐌 v2.5.1 🐞🚞🕵️

05 Dec 05:39
Compare
Choose a tag to compare

repo-icon

🐞 BugFix

  • c: wrong exit code with -q option 🐞

🛠️ Improvements/Refactor

  • use ${array[@]:-}/${array[@]:+} to simplify codes 🚞
  • use file descriptor number instead of /dev/std* (issue #114 summitted by @wushengde)
  • console-text-color-themes.sh, improve robustness/portability:
    • use BASH_SOURCE array to detect whether this script is sourced or not 🕵️
    • use printf 💪 instead of echo
    • use if instead of &&
    • remove global var declare if possible

📚 Documentation

  • add more resources of bash 📚

Have Fun! 💕
2023-12-05

🐌 v2.5.0: add `taoc` 🐈 improve shell robustness/portability 💪

06 Sep 03:20
Compare
Choose a tag to compare

repo-icon

☘️ Features

  • add taoc 🫴 🐈
  • echo-args: align the index number

🛠️ Improvements/Refactor

  • c, improve readable: 👓
    • simplify teeAndCopy function
    • use boolean option parse value holder
    • reanme vars
  • improve shell robustness/portability 💪
    • use printf instead of echo
    • use if-else instead of &&-||
    • involved almost all scripts:
      c/coat/a2l/echo-args/ap/rp/xpl/xpf/uq
      cp-into-docker-run/tcp-connection-state-counter/console-text-color-themes.sh
      find-in-jars/show-busy-java-threads
  • fix shellcheck issues

📚 Documentation

  • update logo and image links in docs 🌁
  • disable default link of github images

🚜 Build/CI

  • update ci.yaml, test on latest MacOS 🍎
  • upgrade shunit2 lib

Have Fun! 💕
2023-09-06

v2.4.4 🌈🚞💅

24 Dec 14:35
Compare
Choose a tag to compare

Improvements/Refactor

Style

  • style: adjust file format 💅
    • update .editorconfig
    • shell files
      • use 2 spaces indentation
      • use $() instead of ``

Docs

  • add dev guide #64 🎓
  • add logo 🎨
  • add TOC for README
  • improve wording/format

Build/CI

  • add github action ci.yaml(remove travis) 👷‍♀️
  • add MacOS CI 🍎

Have Fun! 💕
2022-12-24

v2.4.3 🍢⏳

21 Jul 06:37
Compare
Choose a tag to compare

Improvements

  • show-duplicate-java-classes:
    • fix wrong CPU percentage order under ps from procps-ng 3.3.12 🍢
    • use one option --cpu-sample-interval instead of --top-delay/--use-ps

Cleanup

  • code cleanup
    • remove unused var
    • reorder parameters of function
  • improve documentations
    • update travis badge to travis.com

Have Fun! 💕
2021-7-21

v2.4.2 🕵️‍♂️🗂

16 May 14:40
Compare
Choose a tag to compare

Improvements

  • show-duplicate-java-classes:
    • output duplicate ratio and class number of class path #59 🕵️‍♂️
    • improve percent output format
  • cp-into-docker-run:
    • check required option -c/--container 🗂
  • code cleanup
  • improve documentations: fix broken link #98

Have Fun! 💕
2021-5-16

v2.4.1 🕵️‍♂️📭🔗

30 Apr 07:16
Compare
Choose a tag to compare

Improvements

  • show-busy-java-threads: 🕵️‍♂️
    • improve jstack command search order, JAVA_HOME before PATH
  • find-in-jars:
    • check list zip entries fail, especially common case "Empty zipfile" 📭
    • improve command to list zip entries search 🕵️‍♂️
  • improve scripts cp-into-docker-run/ap/xpf: use portableReadLink 🔗

BugFix

  • xpl: fix unbound variable args[@]

Have Fun! 💕
2021-4-30