cliday

  • About

2022-04-29

April 29, 2022

  1. file-arranger: Simple & capable File/Directory arranger/cleaner
  2. dust: A more intuitive version of du in rust
  3. atuin: Magical shell history

Tip of the week: Use openssl for quick-and-dirty file encryption

Example:

% echo "My plaintext file." > /tmp/file1.txt

# Using the default macOS LibreSSL (results in a binary file):
% openssl enc -aes-256-cbc -salt -in /tmp/file1.txt -out /tmp/file1.enc
% openssl enc -d -aes-256-cbc -in /tmp/file1.enc -out /tmp/file1.txt

# Using OpenSSL from Homebrew (results in a more secure, base64 text file):
% /usr/local/opt/openssl@3/bin/openssl enc -pbkdf2 -iter 100000 -aes256 -salt -base64 \
-in /tmp/file1.txt -out /tmp/file1.enc
% /usr/local/opt/openssl@3/bin/openssl enc -d -pbkdf2 -iter 100000 -aes256 -base64 \
-in /tmp/file1.enc -out /tmp/file1.txt
Continue reading

2022-04-22

April 22, 2022

  1. mkcert: Make locally trusted development certificates with any names you’d like
  2. procs: A modern replacement for ps written in Rust
  3. ripgrep: Recursively searches directories for a regex pattern while respecting your gitignore

Tip of the week: Use awk to increment a semantic version number

Split the string by a period character, and $NF will represent the last segment of the version number. The output field separator is also set to a period character so the return string is in semver format. For example:

% echo "3.6" | awk -v FS=. -v OFS=. '{$NF++;print}'
3.7

% echo "3.6.13" | awk -v FS=. -v OFS=. '{$NF++;print}'
3.6.14

% echo "3.6.13" | awk -v FS=. -v OFS=. '{$(NF-1)++;print}'
3.7.13

% echo "3.6.13" | awk -F. '{$(NF-2)++;print $1}'
4
Continue reading

2022-04-15

April 15, 2022

  1. bandwhich: Terminal bandwidth utilization tool
  2. redo: Create reusable functions from your history in an interactive way
  3. usql: Universal command-line interface for SQL databases

Tip of the week: Convert plist files on macOS to other formats with plutil:

For example:

# From binary format to json or xml:
plutil -convert json ~/Library/Preferences/com.google.Chrome.plist -o ~/com.google.Chrome.json
plutil -convert xml1 ~/Library/Preferences/com.google.Chrome.plist -o ~/com.google.Chrome.xml

# Back to binary format:
plutil -convert binary1 ~/com.google.Chrome.xml -e plist
Continue reading

2022-04-08

April 8, 2022

  1. tealdeer: A very fast implementation of tldr in Rust
  2. prettyping: A wrapper around the standard ping tool, making the output prettier, more colorful, more compact, and easier to read
  3. onefetch: Git repository summary on your terminal

Tip of the week: Easily insert a blank line between concatenated files

For example:

% printf "1: file ending with no newline" > 1.txt
% echo "2: file ending with a newline" > 2.txt

% cat *.txt
1: file ending with no newline2: file ending with a newline

% awk 'FNR==1{print ""}1' *.txt

1: file ending with no newline

2: file ending with a newline

% awk 'FNR==2{print ""}1' *.txt
1: file ending with no newline
2: file ending with a newline
Continue reading

2022-04-01

April 1, 2022

  1. slides: Terminal based presentation tool
  2. curlconverter: transpiles curl commands into programs in other programming languages
  3. trash-cli: Move files and folders to the trash

Tip of the week: Merge two text files side-by-side with paste

For example:

% cat << EOF > file1
HEADER1
Data-1
Date-2
EOF

% cat << EOF > file2
HEADER2
Value-1
Value-2
EOF

% paste file1 file2
HEADER1 HEADER2
Data-1  Value-1
Date-2  Value-2
Continue reading
Prev Next

Powered by Jekyll with Type Theme