Just a PSA, I have seen a lot of post asking how to sync machines. for my purposes, iCloud has performed almost flawlessly *(see caveats below).
I run MacBook Pro and a Hackentosh, and am currently in school for CompSci (I.e. not using it for a business). When at school I program w/ my MacBook, and switch to my Hackentosh at home. Even when I’m at home and away, I can switch back and forth and my files (code, PDF's, etc.) sync almost instantaneously to each (as long as both are connect to the internet). The only issue I have had is using IDEs that don’t auto save after changes like sublime (I.e if you forget to save your work and hop on the other machine your going to use the older/last saved code). As long as you use an IDE that saves any time a change is made (pycharm, Clion, ect.) it’s pretty much flawless. In fact, I can work on code, and imidiately switch over to a terminal that's ssh'd into my other machine and execute the updated code. For ease of use when using the terminal, just create an alias to the iCloud folder in your bash_profile. Mine is alias icloud='cd ~/Library/Mobile\ Documents/com~apple~CloudDocs' .
You do have to pay a monthly subscription, Cost- United States: 50GB: $0.99, 200GB: $2.99, 2TB: $9.99
*Note: A quick search showed the 200GB and 2TB plans are among or are the cheapest plans for those sizes. To me, as I save a lot of other stuff there, and while I have external back ups I have had those fail as well.
* Caveats:
- Syncing is not going to be as fast when working with larger files, for instance video editing. That said 2TB isn't really enough storage for this application anyways. Additionally, just to be safe, I would ensure any changes to large files made on the editing machine have enough time to upload back to iCloud before working on the other machine (to see the status open up a finder window and to the left of your iCloud folder there is an 'updating' pie chart).
- This is blatantly obvious but for those just wanting to opening PDFs, videos, etc. both machines need to have a program that can open it (i.e. to open a pdf both machines need a pdf reader....). However, for purposes like mine (executing code) both machines need to have the same environment (libraries, ect.). Moreover when using more robust IDE's, if you wan't to execute/debug code inside the IDE, your libraries must be in the same location (i.e. if paths are different you are going to have to constantly change the IDEs path to the library being used). Using homebrew pretty much takes care of this issue as long as your 'brew list' is the same, which brings me to a request.
Request: I would greatly appreciate it if someone would create a bash script that could do the following, if its even possible/feasible.
- One off - From the content of my current 'brew list' I would like to save a txt file that is easily read by bash. We'll call it brew_list.txt .
- Create a bash script (check_brew_list.sh) that I would drop on both of my /Users/'username' directories that at a certain time interval (say 9pm) checks the brew_list.txt file, and checks it against that machines brew_list. If it finds a difference, it either updates iClouds brew_list.txt file (the machine added a package) or if the machine is missing a package, the machine downloads the missing packages from brew, or even trigger a pop up/terminal window that notifies me I am missing a certain package.
- Additionally, if the brew_list.txt and check_brew_list.sh protected (rsa key?) that would be quite beneficial in the case someone hacks my iCloud account, and edits the brew_list.txt to do something malicious.
ReplyShare
[link] [comments]
Post a Comment