Created
April 29, 2024 09:06
-
-
Save duowb/38ef33f628de74381773caef79442659 to your computer and use it in GitHub Desktop.
Revisions
-
tuxity renamed this gist
Nov 30, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
tuxity revised this gist
Nov 30, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -46,4 +46,4 @@ if [ ! -z $hash2 ]; then rm ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/.$hash2 fi echo "Done" -
tuxity revised this gist
Nov 30, 2023 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,14 +24,15 @@ case $version in ;; esac echo "Reseting trial time..." regex="([0-9A-Z]{32}) = " [[ $(defaults read $file) =~ $regex ]] hash=${BASH_REMATCH[1]} if [ ! -z $hash ]; then echo "deleting $hash array..." defaults delete $file $hash fi @@ -41,7 +42,8 @@ regex="\.([0-9A-Z]{32})" hash2=${BASH_REMATCH[1]} if [ ! -z $hash2 ]; then echo "deleting $hash2 folder..." rm ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/.$hash2 fi echo "Done" -
tuxity revised this gist
Dec 8, 2021 . 3 changed files with 47 additions and 38 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ #!/bin/bash set -e file=$(defaults read /Applications/Navicat\ Premium.app/Contents/Info.plist) regex="CFBundleShortVersionString = \"([^\.]+)" [[ $file =~ $regex ]] version=${BASH_REMATCH[1]} echo "Detected Navicat Premium version $version" case $version in "16") file=~/Library/Preferences/com.navicat.NavicatPremium.plist ;; "15") file=~/Library/Preferences/com.prect.NavicatPremium15.plist ;; *) echo "Version '$version' not handled" exit 1 ;; esac echo -n "Reseting trial time..." regex="([0-9A-Z]{32}) = " [[ $(defaults read $file) =~ $regex ]] hash=${BASH_REMATCH[1]} if [ ! -z $hash ]; then defaults delete $file $hash fi regex="\.([0-9A-Z]{32})" [[ $(ls -a ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/ | grep '^\.') =~ $regex ]] hash2=${BASH_REMATCH[1]} if [ ! -z $hash2 ]; then rm ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/.$hash2 fi echo " Done" -
tuxity revised this gist
Dec 8, 2021 . 1 changed file with 19 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #!/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 - -
tuxity created this gist
Mar 18, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #!/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 -