10 - 3rd party linux tools
Package Managers
NVM
NVM is a way to manage different versions of node.
Installation
You can install NVM through a curl command to the git repo. NVM also adds lines of code to the ~/.bashrc in order to source the NVM and run it upon startup.
Git Bash
For git bash, you can install NVM as normal but then you must add the sourcing code to ~/.bash_profile as that is what is run at the start of every session instead of ~/.bashrc.
Usage
You can install node with nvm install node or nvm install <version>.
You can use a specific version with nvm use <version>:
nvm install 20: installs node version 20nvm install --lts: installs the current lts version of node
gog: manage google ecosystem
Setup
To use gog, you first need OAuth permissions. Follow these steps:

- Go to the Google Cloud Console (https://console.cloud.google.com/apis).
- Create or select a project.
- Create OAuth 2.0 credentials:
- Go to "APIs & Services" > "Credentials."
- Click "Create Credentials" > "OAuth Client ID."
- Choose "Desktop App" or "Other" as the application type.

- Go Go to the individual Google Drive API and Google Docs API pages and enable those APIs. This is required for GOG to be able to use them with your OAuth client ID.
- Download the secret JSON after the client ID is successfully created: this is the credentials you use for permanent
gogaccess. Then authenticate with it

Auth setup
You can use gog to manage multiple google email workspaces at the same time. To do so, you must first login:
gog login <email>
You also have these tools to manage multiple auth accounts:
gog auth add <email>: adds the gmail account and authenticates with itgog auth remove <email>: removes the gmail account from the authenticated accounts.gog auth list: lists all the authenticated accounts with this CLI
Obsidian CLI
The obsidian cli is run with the obsidian command which brings up a TUI (interactive CLI). The TUI and CLI are only available if the Obsidian app is currently open.
Vault Commands
These commands run in the context of the current vault you have open in obsidian
daily: opens today's daily note in the current vaultdaily:append: appends content to the daily note, and then you can pass inkey=valuearguments.search: searches the current vault, and then you can pass inkey=valuearguments.create: creates a new note, and then you can pass inkey=valuearguments.
# Open today's daily note
obsidian daily
# Add a task to your daily note
obsidian daily:append content="- [ ] Buy groceries"
# Search your vault
obsidian search query="meeting notes"
# Read the active file
obsidian read
# List all tasks from your daily note
obsidian tasks daily
# Create a new note from a template
obsidian create name="Trip to Paris" template=Travel
# Create a new note with content
obsidian create name=Note content="# Title\n\nBody text"
# List all tags in your vault with counts
obsidian tags counts
# Compare two versions of a file
obsidian diff file=README from=1 to=3
Switching vaults
you can run vault commands in a different vault by specifying the vault name you want to target with the vault= command:
obsidian vault=Notes daily
Opening a vault
Open a vault from the TUI with the vault:open command, passing the name of the vault:
vault:open name=<name> # (required) vault name
ImageMagick
You can install this CLI tool using brew on mac.
The basics of using it follow this pattern:
magick [input-options] input-file [output-options] output-file
Basics
Here are the 9 most common use cases:
- Convert an image to a different format
To convert a JPEG to a PNG, simply specify the new file extension in the output file name.
magick input.jpg output.png
- Resize an image
-
Resize to specific dimensions: To fit an image within a given width and height while maintaining its aspect ratio, use the
-resizeoption.magick input.png -resize 800x600 output.png -
Force specific dimensions: To stretch or shrink an image to an exact size, ignoring the aspect ratio, add an exclamation mark (
!).magick input.png -resize 800x600! output.png -
Resize by percentage: Use a percentage value to scale the image proportionally.
magick input.png -resize 50% output.png
- Crop an image
Crop an image by specifying the width, height, and starting position (+x+y). The coordinates are from the top-left corner.
magick input.png -crop 200x200+50+50 output.png
- Rotate and flip an image
-
Rotate: Rotate an image by a specified number of degrees.
magick input.png -rotate 90 output.png -
Flip (vertical): Flip the image along its horizontal axis.
magick input.png -flip output.png -
Flop (horizontal):