How can I sync installed extensions to another matchine? - vscode-extensions

I have 2 remote servers which has almost the same system environment except that one doesn't connect to the Internet. So I want to install extensions on the connected one and copy the .vscode-server/extension dir to the unconnected one.
However, I fond that the vscode-server on the unconnected one can't recognize the copied extensions, is there any way to make my ieda work?

After some tryings, I found the key file is .vscode-server/data/User/extensions.json,copy this file at the same time makes the extensions work.

Related

Is it possible to work with an editor remotly?

I want to edit files on my server, but don't want to always upload the files, is there a way on to edit the files remotly?
I tryed to make an bash script which should upload the files, but its not realy good :/ and sometimes didn't worked
You can use Atom with the
Retome FTP edit
Package
If you have got an SSH (SFTP enabled) access to your server, an option would be use use SSHFS to mount a remote directory on your local working path.
In this way you can use any editor (or even something else) to change your files and they will always be synchronised.
Just keep in mind that, in this way, files are actually located on your server, you won't have a real copy on your local machine.

Can I use GUI/UI interface instead of command line on AWS Lightsail?

I just created a aws lightsail instance, which includes nodejs under Ubuntu, and it is quickly setup, which looks cool.
However I only find the command line operation. I still cannot find the GUI, as it is uncomfortable to edit file through command line.
Any idea of how can I use GUI on it?
Welcome to the world.
No, You cannot use the GUI/UI to edit the files on the Amazon Lightsail instances. You can connect to the server using winscp software and edit the web root files on your machine.
To edit the files out side web root you have to rely on the editors suggested by David J Eddy
Well, looks like I'm a bit late in answering this question, but yes, there is a way to edit files using a GUI.
To do this, install an FTP client on your own computer (not Lightsail server). Popular examples include FileZilla and Cyberduck, and both have free versions.
Once downloaded, you just type in your Server IP address and link your .pem keychain file (should be downloaded from lightsail.aws.amazon.com).
With this new software, you can edit files from your instance and the file structure on your own computer.
Nope. The Ubuntu flavors used in LightSail are of the 'Server' variety. You may not like the idea of editing via the CLI but, honestly, learn it. VIM, eMacs, Nano, etc. Find an editor you can handle and learn it as well as you can. This will help you much later.

What is a difference between vcenter's template and virtual machine?

As in the topic.
I wonder since I cannot find this information anywhere and currently I am using a virtual machine (linux) on my vcenter which is cloned and then a special shell script is run on this freshly cloned machine to setup up environment and IP adresses etc.
Maybe I would be able to benefit from templates this way.
I think this will be helpful
https://www.robertparten.com/virtualization/vmware-difference-between-clone-and-template/
Few Differences in my opinion:-
Virtual machine is the running instance while Template is compact copy of VM ( with baseline and factory settings), which can be stored anywhere.
one need to deploy template to make running VM.
one can create copy from both VM and template but in VM you need to clone it and in case of template you need to deploy it.
moving between different setup is easy with template.
Rest are already mentioned in link provided.
But first you need to search on your own and still have doubts than only ask, that's how we all learn.
Happy Learning!
Looking at these two scenarios:
Create a template from your active VM, then deploy from the template.
Deploy from the active VM directly.
As far as I know, there will be no difference in the end result if you run these scenarios in the near future. You'll still have to run a script in order to get your IPs setup, etc.
So what's the difference?
If you mess stuff up with your active VM, change things around or whatever, you lose the ability to deploy from the (good) setup you had.
Once you make a template from your active VM, that configuration is saved as a file on the ESX (or the storage, not 100% sure) and can be re-deployed in the future.

How to copy an *.exe file from one computer and paste it to another computer over LAN

For example I have a client-server application, this application often gets updated (it's an exe file). If I download the update on the server machine then the same update should be transfered to the client machines, or vice-versa.
At the moment the update is downloaded on all machines individually. My idea is downloading the update should be done only on the server and I'm planning to make an option in the client to copy the *.exe file (update) directly from the server and paste it on the installation path.
How can I make this happen?
NOTE : the update is a self extracting file.
There is already a technology for achieving this called ClickOnce. The client application can be "published" to a share that is accessible to all the clients, then each time the client is executed a version check is done - if a later version is detected on the share then it is downloaded before execution continues.
You can read more about this here: ClickOnce Security and Deployment. Creating a ClickOnce package and publishing it is a feature already built into Visual Studio, so you do not need to write any code.
You have to write an application that will be split into different parts :
Detect file change either on the client or server machine
Perform the copy of the exe file to server or other clients.
In all cases you can't tell an exe file to update it self.

How to close/unshare a file being used by another user?

My .NET app updates a certain .xls file located in a shared folder inside the domain. Using VB.NET, how can I check if that file is being used by another user and unshare/close it, so my code can update the file properly?
NOTE:.Exe file(my app) will be executed in the server where shared folder is.
Windows and NTFS is designed to prevent this scenario. Unless you:
Get the Excel application which is holding the .xls file open to close it
Shut down the server's network connection assuming the Excel file is opened by client PCs - a highly undesirable step to take
Discover the PC on which the Excel.exe instance is running and use the Windows Taskkill command-line command to kill all Excel.exe instances (since you won't necessarily know which one has it open) on the machine - another undesirable step to take
Have a look at this answer, but this uses third-party utilities, and doesn't explain how these utilities do what they do though you may be able to Process.Start them.
you just can't get Windows/NTFS to release the file lock.
A possible alternative that I'm not sure will work with an xls (as opposed to an xls_) is to make the file shared, though this has some limitations.