I'm going to reinstall Windows and I have a lot of deployment projects, SSH connections, saved passwords in my PhpStorm.
How to export all this data?
Related
I am working on a repository where I have to extract some features from millions of files.
For me, the current workflow is:
Write code in IntelliJ
Run unit tests
Dry run with small data
ssh to the remote machine
sftp the current code to the remote machine
Run on the server with all million of files
Look into the log exceptions and find out where the code is failing for edge cases
Fix those issues and repeat from step 1
My question would be three-fold:
Is there an easy way how I can sync code with the remote machine automatically (I know I commit to git and then pull the changes in the machine. But is there some other way other than setting up rsync etc.?)
Can I run code directly in the remote machine from IDE and debug it that way?
1) There are a lot of ways to sync your code. Sometimes the best way is to create a kind of deploy script in Python or sh if you don't want to commit and push any changes you are going to test on server. You can use sftp or scp with more automation here (use gzip and so on). Git and rsync are more mature solutions here. But with VCS your problems will be more reproducible and easier to find.
2) You can connect to remote process to debug it directly from IntelliJ. There is a official tutorial for that: https://www.jetbrains.com/help/idea/tutorial-remote-debug.html (but it depends on your security settings because Java debug protocol is not secured itself, you may need to setup SSH tunnel for that)
3) Another, a bit more radical option: you might run IntelliJ IDEA itself on server and debug directly. You can use Projector - an open source project which lets you run IntelliJ on the server with UI in the browser (no X11 required to run). I recommend you look at this repo firstly https://github.com/JetBrains/projector-docker or configure IntelliJ on server following instructions here: https://github.com/JetBrains/projector-server.
I'm a frequent user of PyCharm and a number of the other JetBrains IDEs. I try to keep my settings synchronized across the different IDEs, but I'm now considering moving to IntelliJ IDEA and am finding it extremely difficult to figure out what I've changed and what the differences are among my different settings files.
How can I put my PyCharm settings files under version control so that I can track my changes and also quickly revert back to old versions so I can try out new settings changes without fear?
(I don't mind exporting to a specific repo each time, but it seems that the settings always export as JAR files, which don't lend themselves to VCS.)
I am using the Settings Repository plugin to syncronize settings between PyCharm and PhpStorm and it is working very well. It is actually designed with version control and team sharing in mind, see project repo on github and have built in support for conflict resolution, merge and overwriting remote or local.
It does also support file system and, from what I can tell, what then is stored is the mirror version of the git repository.
PyCharm (at least the Linux 4.X and 5.0 Pro versions) places its config files in a .idea dir under the project dir:
$ find .idea/
.idea/
.idea/libraries
.idea/libraries/Google_App_Engine_SDK.xml
.idea/libraries/Generated_files.xml
.idea/apartsw.iml
.idea/misc.xml
.idea/modules.xml
.idea/runConfigurations
.idea/runConfigurations/apartsw.xml
.idea/encodings.xml
.idea/vcs.xml
.idea/inspectionProfiles
.idea/inspectionProfiles/MyProject.xml
.idea/inspectionProfiles/profiles_settings.xml
.idea/watcherTasks.xml
.idea/webResources.xml
.idea/workspace.xml
.idea/scopes
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/dictionaries/username.xml
I added the entire dir with the exception of .idea/workspace.xml into the project's git repo, following JetBrains' PyCharm-specific and/or generic .idea-based Tools recommendations.
I do all my development on a Mac, and my files are on a remote Linux server. I use SSHFS to access the files. When I am using IntelliJ on a local project, I don't even notice the file synchronization, most likely because it can access the files very quickly. But when I have a project open through SSHFS, the synchronizing takes a very long time, which is a pain because inspections are dependent on synchronization being finished. I can't see any code analysis until the synchronization is done.
I saw one solution where someone moved the intellij project files to a local directory and had the project point to the SSHFS files, but I'd rather have everything in one place.
I need to know how to either speed up the synchronization or make inspections run even if the files are synchronizing.
You should consider having a local copy of all your files on your mac, and using a sync utility like Unison or RSync to keep your files in sync
I have recently started using Atom editor. Its pretty great so far. I am planning to install it on several other machines.
How can I replicate the config and list of packages installed on my current machine to other machines. Is there a config that I can use to export and import them on other machines.
Use Git to version control your config file (~/.atom/config.cson), and any other config files (dotfiles) you may have.
You can then host your Git repository for free on somewhere like GitHub, and retrieve it on other computers simply by running git clone https://github.com/{username}/{repo}.
You can then keep it up to date using git push (to upload changes) and git pull (to download changes).
To track installed packages as well, you will need to run:
apm list --installed --bare > ~/.atom/package.list
And add that file to Git also. To restore, use:
apm install --packages-file ~/.atom/package.list
You can use the apm command to save/restore installed packages.
To export packages (only packages name):
apm list --installed --bare > ~/Gdrive/backup.txt
To import packages:
apm install --packages-file ~/Gdrive/backup.txt
On Linux apm is available if you install Atom from .deb file.
On OSX: open atom -> install shell command
Windows: apm in C:\Users\YOUR_NAME\AppData\Local\atom\bin
atom-package-sync is a package that I created a couple weeks ago. It works a little bit like the synchronization of Google Chrome, you just login and it syncs your packages and settings automatically across all your Atom instances.
I plan to release the source code for the server side in the coming weeks and add an export feature for alternative backups.
This question was already (if I understood you correctly) in how to sync Packages and settings for multiple computers in Github Atom Editor.
You might find the answer in a blog post I wrote. I hope it helps How to synchronize Atom between computers.
On OSX/macOS:
Open Terminal on the computer which has the settings you want to preserve / sync to others.
Move your ~/.atom folder to Dropbox or other synced service (~ represents your /users/<your_username> folder), like so:
mv ~/.atom ~/Dropbox/atom
Open terminal, and make a symlink that connects the place Atom expects its config to be (~/.atom), to your synced folder, like so:
ln -s ~/Dropbox/atom ~/.atom
On other computers you want to use these settings, open Terminal and run:
rm -rf ~/.atom && ln -s ~/Dropbox/atom ~/.atom
(This deletes the .atom folder and adds the symlink in one line.)
With this method, your settings are automatically in sync on each computer, no need to manually update anything.
The only potential bug I have noticed can occur if your settings specify a font which another computer does not have. Installing the font on that computer fixes. All packages, themes & settings installed by Atom are automatically there.
This same method can be used for many apps (WebStorm, Sublime Text, iTunes are a few examples).
The atom package manager supports starring packages, either online (through atom.io/packages and atom.io/themes) or on the commandline using
apm star <packagename>
or
apm star --installed
to star all of your installed packages.
Starred packages can then be easily installed using:
apm stars --install
Note that starring packages requires logging in to atom.io using your github account.
Install a package called sync-settings using atom package installer
Use Github Personal Access Token
And create Gist Secret for ~\username\.atom\config.cson file
On your primary Atom computer, navigate to packages > Synchronize Settings > backup
On target machines install sync-settings, then use Restore function from Synchronize settings.
Some of the packages that you had to run PIP, you would need to run pip on target machines as well, otherwise, you good to go.
In a project we a forced to use IBM RAD and Webspher Application Server (6.1).
Setting up the development environment is currently described in about 10 pages of wiki documentation and takes about a day if you don't do any mistake. The main parts are:
Installing the IBM Installer;
Use it to install RAD
Install a patch to the Installer;
use it to install half a dozen patches to RAD
create a network drive pointing to ...
checkout project source to ...
install WAS
configure the a WAS instance with two jdbc drivers, 6 datasources, a queue ...
I think you get the idea
I'd like to automate that process (or at lest 95% of it) to something like.
start script x.
On prompt enter a directory with at least yGB of memory available.
Get yourself a cup of coffee
start working.
What are the proper tools to get this working? Should I use something like puppet and chef? Or is that overkill and I can just zip the installation directory and change 2 registry entries?
Has anybody experience with this? Any pointers to get started?
You can script the configuration of WAS using wsadmin:
http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.base.doc%2Finfo%2Faes%2Fae%2Fwelc6topscripting.html
It is some effort to learn how to do so but in the end it saves a lot of time. You need to use Jython or Jacl to do so.
WAS profiles can be created headless with a response file. Use manageprofiles.bat in bin directory of WAS to do so.
Regarding RAD installation you can install the IBM Installation Manager version you need to install the patches right away and then install everything in one shot. Add the fixes you need as Repositiories right from the beginning. The fixes will be installed instead of the old versions in this case. You should have the base images and all fixes on the local disk to do so.
The installation of RAD itself can also run in headless mode but I don't have any experience in doing this.
The configuration of the RAD workspace is the next thing you want to automate. This is not so simple to do. The simplest thing you can do is to export the workspace preferences of a workspace that contains all settings to an eclipse preference file (.epf). File -> Export
This is not a complete solution but may help you a bit. Be sure to keep all settings in just one file and import that into a fresh workspace.
Use Notepad++ TextFX plugin to sort the settings in the epf file. You can then figure out which settings you need just by looking at them.
More control over the workspace settings and automated conifiguration requires accessing eclipse internal APIs and some coding.
Regarding the the project sources it depends on the SCM you are using.