Installed software
Intellj IDEAWebStormData GripVisual Studio Code



Git
xcode has git, so you just need to download xcode, xcode is used in many places, so it is generally downloaded, it is recommended to download from the official website, not from the app store, because the download speed of the app store is too slow.
The latest version on the official website is 16.2, which is 2.7GB, and after decompression, it is about 10GB, so downloading and installing both take time.
xcode official download address
Terminal
#terminal
export CLICOLOR=1
autoload -U colors && colors
export PROMPT="%{$fg_bold[green]%}it-fb %{$fg_bold[yellow]%}%1~ %# %{$reset_color%}"
tips: Run source ~/.zshrc
after saving to take effect
CLICOLOR=1
means enabling colors
autoload -U colors && colors
means loading colors
%{$fg_bold[green]%}
means setting the text color to green and bold
%{$fg_bold[yellow]%}
means setting the text color to yellow and bold
%1~
means the first character of the current directory, ~ means home directory
%#
means the command prompt, % means a regular user, # means root user
%{$reset_color%}
means resetting the text color
Effect
FNM
#fnm
eval "$(fnm env --use-on-cd --shell bash)"
SDKMAN
#sdkman
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
Compression
Using Apple's built-in compression tool has some drawbacks, such as not being able to set a password and excluding unnecessary files like .git
and .DS_Store
.
Therefore, you can use a bash script with the zip
command.
The process is roughly as follows:
Find the Automator app
Then select Quick Action
Pay attention to the highlighted red box
Exclude all hidden files
#!/bin/bash
cd $(dirname "$1")
zip -r $(basename "$1").zip ./$(basename "$1") -x ".*" "*/.*" "*/__MACOSX/*"
Exclude .git and .github folders
When packaging projects, you usually don't need to include .git
and .github
folders. You can use the following script.
#!/bin/bash
cd $(dirname "$1")
zip -r $(basename "$1").zip ./$(basename "$1") -x "*/.git/*" "*/.github/*" "*/node_modules/*" "*/.DS_Store" "*/__MACOSX/*"
Encryption
Using Apple's scripting language AppleScript
, you can pop up a dialog to get the password, and then use the zip
command to compress the files.
#!/bin/bash
# Use AppleScript to pop up a dialog to get the password
PASSWORD=$(osascript -e 'Tell application "System Events" to display dialog "Enter password for ZIP file:" default answer "" with hidden answer buttons {"Cancel", "OK"} default button "OK"' -e 'text returned of result')
# Check if the password is empty
if [ -z "$PASSWORD" ]; then
exit 0
fi
cd $(dirname "$1")
zip -r -P "$PASSWORD" $(basename "$1").zip ./$(basename "$1") -x "*/.DS_Store" "*/__MACOSX/*"
The first time you use it, an authorization dialog will pop up. Just click "Allow".