Skip to content

Instantly share code, notes, and snippets.

@duowb
Created April 29, 2024 09:06
Show Gist options
  • Select an option

  • Save duowb/38ef33f628de74381773caef79442659 to your computer and use it in GitHub Desktop.

Select an option

Save duowb/38ef33f628de74381773caef79442659 to your computer and use it in GitHub Desktop.
Reset Navicat Premium 15/16 remaining trial days
#!/bin/bash
file=$(defaults read ~/Library/Preferences/com.prect.NavicatPremium15.plist)
regex="([0-9A-Z]{32}) = {"
[[ $file =~ $regex ]]
defaults delete ~/Library/Preferences/com.prect.NavicatPremium15.plist ${BASH_REMATCH[1]}
cd ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/
str=$(ls -a | grep '^\.')
regex="\.([0-9A-Z]{32})"
[[ $str =~ $regex ]]
rm .${BASH_REMATCH[1]}
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment