Update utils

This commit is contained in:
2026-01-16 16:27:01 +05:30
parent 2a0690319a
commit 3fae61dfb7
3 changed files with 91 additions and 1 deletions
@@ -337,7 +337,7 @@ subtitleBurn(){
# Gen random password
genPassword(){
cd ~/.node_modules_mine;
node -p "require('base-x')('!#$%&()*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_abcdefghijklmnopqrstuvwxyz{|}~' ).encode( crypto.randomBytes(${1:-15}) )"
node -p "require('base-x').default('!#$%&()*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_abcdefghijklmnopqrstuvwxyz{|}~' ).encode( crypto.randomBytes(${1:-15}) )"
}
# Convert json to csv with column headers
@@ -445,6 +445,14 @@ usbreset(){
done
}
# Make sample pdf file
# mk-sample-pdf [count=10] [prefix=sample-]
mk-sample-pdf(){
count=${1:-10}
prefix=${2:-sample}
for i in `seq 1 $count`; do printf "Sample PDF #%02d\nThis is test PDF number %02d\n" "$i" "$i" | enscript -B -o - | ps2pdf - "${prefix}_$i.pdf"; done
}
# Setup autocomplete. run eval "$(THIS_FILE setup-autocomplete)"
setup-autocomplete(){