๐ useful scripts for making developer's everyday life easier and happier, involved java, shell etc.
[!NOTE] This is a WIP/cleanup release for upgrading version to
3.x
legacy bin
๐ฎtest-cases
to test
๐It's time to say goodbye, 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
c
]: ensure using command on PATH
, and check the command existence on PATH
๐ฃcoat/taoc
]: add --help/--version
options ๐ฉfind-in-jars
]: add IFS=
for read
, more robust ๐ช
show-busy-java-threads
]:
timestamp
var to avoid inconsistency โ๏ธusage
function simple-s
/-h
option for optional argument of die
function${var##*/}
instead of basename
to assign PROG
var ๐๏ธ
realpath
instead of function portableReadLink
๐
type -P
instead of which
command, faster ๐show-busy-java-threads
]: rename global var USER
-> WHOAMI
๐คuq
]: use exponential operation instead of multiplication to calculate size ๐งฎc
]: rename functions ๐กShell Arithmetic
comparison instead of Conditional Expressions
๐ข=
instead of ==
in Conditional Expressions
||/&&
instead of one branch/one line if
๐ฐcolorPrint
function if only one callerUNAME
var ๐ COLOR_INDEX
instead of COUNT
declare
keyword for global vars, more consistent{}
when use varlocal nl=$'\n'
declaration if only one usage1
in redirections โก๏ธshellcheck
item doc link instead of prolixity comments โจdependabot.yml
๐คshunit2
libHave Fun! ๐ 2024-04-12
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 ๐ข/usr/bin/env
in shebang (by @hyperupcall in #119) ๐coat/taoc
: ๐
cat
(more straightforward and faster) ๐ธcolorLines
function ๐a2l
: merge function colorPrint
into rotateColorPrint
๐ ๏ธprintf format
if possiblemessage
-> content
, normal
-> color_reset
๐\e
instead of \033
-t
check{}
when use varshunit2
libHave Fun! ๐ 2024-01-25
c
: wrong exit code with -q
option ๐${array[@]:-}
/${array[@]:+}
to simplify codes ๐/dev/std*
(issue #114 summitted by @wushengde)console-text-color-themes.sh
, improve robustness/portability:
BASH_SOURCE
array to detect whether this script is sourced or not ๐ต๏ธprintf
๐ช instead of echo
if
instead of &&
bash
๐Have Fun! ๐
2023-12-05
taoc
๐ซด ๐echo-args
: align the index numberc
, improve readable: ๐
teeAndCopy
functionprintf
instead of echo
if-else
instead of &&-||
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
shellcheck
issuesci.yaml
, test on latest MacOS
๐shunit2
libHave Fun! ๐
2023-09-06
show-duplicate-java-classes
: print info message and exit when search no jar files or find no class files โน๏ธcoat/a2l
: skip color for white space lines ๐readonly
if possible ๐
$*
in string instead of $@
๐.editorconfig
$()
instead of ``ci.yaml
(remove travis
) ๐ทโโ๏ธMacOS CI
๐Have Fun! ๐
2022-12-24
show-duplicate-java-classes
:
CPU
percentage order under ps
from procps-ng 3.3.12
๐ข--cpu-sample-interval
instead of --top-delay
/--use-ps
โณHave Fun! ๐
2021-7-21
show-duplicate-java-classes
:
cp-into-docker-run
:
-c/--container
๐Have Fun! ๐
2021-5-16
show-busy-java-threads
: ๐ต๏ธโโ๏ธ
jstack
command search order, JAVA_HOME
before PATH
find-in-jars
:
cp-into-docker-run/ap/xpf
: use portableReadLink
๐xpl
: fix unbound variable args[@]
โพHave Fun! ๐
2021-4-30