-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is this script so freaking complicated for no reason? #57
Comments
Do not BB, show your code. |
@NicoleGoldMan what does BB mean? MacOS below, can be adapted to any OS with help of chatgpt. #!/bin/bash
# Set config file path
c="$HOME/library/application support/cursor/user/globalstorage/storage.json"
# Kill existing Cursor processes (case-insensitive)
pkill -f "Cursor"; pkill -f "cursor"
# Generate new machine and device IDs:
# m: random hex string -> sha256 hash -> first word
# d: unique UUID
m=$(openssl rand -hex 32|sha256sum|cut -d' ' -f1); d=$(uuidgen)
# check if file exists
if [ ! -f "$c" ]; then
echo "Couldn't find the config file, are you on Mac?"
else
# modify the json values
sudo jq --arg m "$m" --arg d "$d" '.["telemetry.macMachineId"] = $m | .["telemetry.machineId"] = $m | .["telemetry.devDeviceId"] = $d' "$c" > "$c".tmp && mv "$c".tmp "$c"
fi
# Set config file permissions to read-only (444) for all users
sudo chmod 444 "$c"
# Inform the user that the operation was successful and requires a restart
echo "Cursor IDs reset. Restart Cursor." |
Just to prove a point.
|
Haha yeah, you're absolutely right - if it's just about modifying a config file, a few lines of bash script would do the job. |
I truly don't understand. Thousands upon thousands of lines of code just to do a simple text substitution in a file.
multilingual support. Progress tracking. Multi-arch binary compilation. GitHub release automation. Wtf? Is this project your PhD thesis?
This can be a 5 line bash script.
Hell you can probably do this in one single line....
The text was updated successfully, but these errors were encountered: