Skip to content

Instantly share code, notes, and snippets.

@hmphu
Created December 14, 2021 09:33
Show Gist options
  • Save hmphu/fc3a7035fe0a347a194151dc645c797e to your computer and use it in GitHub Desktop.
Save hmphu/fc3a7035fe0a347a194151dc645c797e 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 -
#!/bin/bash
file=$(defaults read ~/Library/Preferences/com.navicat.NavicatPremium.plist)
regex="([0-9A-Z]{32}) = {"
[[ $file =~ $regex ]]
defaults delete ~/Library/Preferences/com.navicat.NavicatPremium.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 -
@latuandev
Copy link

Script này mac dùng có work không ạ?

@hmphu
Copy link
Author

hmphu commented May 1, 2022 via email

@latuandev
Copy link

Mình dùng bữa giờ vẫn chạy tốt nhé Tuấn ơi
On Sun, 1 May 2022 at 21:28 Lê Anh Tuấn @.> wrote: @.* commented on this gist. ------------------------------ Script này mac dùng có work không ạ? — Reply to this email directly, view it on GitHub https://gist.github.com/fc3a7035fe0a347a194151dc645c797e#gistcomment-4150843, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVUKJMPOYSIU53P3VVTBHLVH2IHXANCNFSM5UZ6USXQ . You are receiving this because you authored the thread.Message ID: @.***>
-- Regards, Phu Hoang

em cảm ơn ạ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment