Adding more folders for deployment with phpStorm - file

I already added additional folders from the same FTP via View > Remote Host. As I press sync the new folders doesn't appear in my local copy or in the project view. Now I like to have the local copy that I can edit (autosync on save is enabled).
How do I import those additional files?

Here's how I did it. From the Remote Host tab right-click the folder and select "Remove Path From Excluded". Then I drag the remote folder over to where it should be in the Project (local) pane and it copies all the files over.
I tried the sync from deployed, sync with local like the docs say but never did anything. Above method worked for me

Related

How do i restart PostgreSQL service after putting back the original Data folder?

I'm writing some batch scripts for doing incremental backups of a PostgreSQL cluster on a Windows Server.
I copied the Data folder to a different folder, ran my backup scripts, stopped the service, deleted the Data folder, and tried recovering the database from the WAL files and such.
This didn't work, because i copied the wrong log files, and i couldn't get the service started again, so i tried copying back in the original Data folder, but i still can't start the service.
The first script i ran called:
pg_basebackup -Fp -D %BACKUPDIR%\full_%CURRENTDATE%
This was the only line which actually ended up interacting with the data, but not the original Data folder, which i copied beforehand.
When trying to start the service again i get the following error message:
The postgresql-x64-10 - PostgreSQL Server 10 service on Local Computer started and then stopped.
Some services stop automatically if they are not in use by other services or programs.
I have gotten this before, when making a typo in the conf file, so i'm guessing that's just the standard error message for when something is missing.
Found out that i had to redo the folder permissions.
This is done the following way:
5. Change permissions for the new data directory
For the new data-dictionary folder: Right-click on it and click Properties. Under the Security Tab click “Edit...” and then “Add...”. Type “Network Service” and then click “Check Names”, make sure it has Modify and Full Control permissions and then click OK. Equally important PostgreSQL needs to be able to “see” the data-directory (see my ServerFault.StackEx question), i.e. it needs to have read access to the parent directories above it. So Right-click on the pg_db folder and under the Security Permissions add Network Services again, but this time it only needs Read & Execute as well as List folder contents permissions.
The full post is a nice checklist to go through, for anyone else facing similar issues:
https://radumas.info/blog/tutorial/2016/08/08/Migrating-PostgreSQL-Data-Directory-Windows.html

SQL Database not linking to local svn repository in Redgate Source Control

I am trying to link by database to Redgate Source Control but I am getting the error.
I have repository in SVN Source Control system in local folder.
Version of Redgate Source Control: 7.0.6.8775
SVN version: TortoiseSVN 1.11.0
Following is the error message.
Unable to connect to a repository at URL 'file:///D:/SVNRepo/DevDB'
Screenshot: https://www.screencast.com/t/2pPpZbR1
Anybody know how to fix?
I solve it, it was version issue.
I created the repository in TortoiseSVN 1.9.4 and it works.
If you want to connect it to a local folder, then you must tell it to connect to Working folder from the left pane. You told it to connect to SVN, but giving it a path to a folder. Click the radio button next to Working folder and browse to the folder where your working copy is stored, or where you want to make one.

How do I move 2 csv files from my local machine to a remote machine (both are windows machines) ?

I'm looking for a one click solution like a vbs or batch file which would copy 2 csv files from my local machine to a remote server on a particular location. This is primarily what I'm looking for.
Also, I would like to know if the same is possible if my account is not added into the server users list (I don't have access). Is there some way by which just that particular location will be shared?
You can try and share the specific folder on the server with your network. After that go to your client and open up the explorer. navigate to 'computer' and on the bottom you should find your network ressources. right click and add the server with his IP address. If done correctly you should have access to the servers folder as if it was one of your client. So you should now be able to create a desktop shortcut to the servers folder and be able to add files to the folder by drag & drop. Of course now you could write a simple batch file that copies all the contents of one of your folders to the servers folder.

Electron - How to setup db with sqlite in Windows

I have created an electron app, and built it with electron-builder. It creates a package in the dist folder, which I am able to install and then run the resulting application.
I have a sqlite database in the root folder of my project, with some data in it. But when I package and then run the exe file, it seems not to connect to the database or it appears empty. If I simply run the project with electron without packing, it is able to connect to the database and make use of the data.
Also, if visit the installation folder, there I find a copy of the database I had in my application but without any rows in it. Inside an .asar folder, there is a database populated as I would want but this one I supposedly cannot edit.
Would you have any pointers on what could be causing this? How can I properly connect to the database I have in the root folder of my project using sqlite, sequelize, windows and electron?
Thanks in advance
Ensure that electron-builder doesn't pack the database file into the app ASAR (use the asarUnpack option).
If your packaged app needs to modify the database then have it copy the file to the location returned by app.getPath('userData') and work with that copy. Your app generally does not have permission to write to the directory in which it is installed.

Change SSMS Default File Location (Specifically Templates)

TLDR: How do I change the default location for SQL Server Management Studios 2014 without uninstalling and reinstalling?
I recently installed SQL Server Management Studio 2014, and the default file locations aren't where I want them. I was able to change the default query location and default project location through Tools -> Options, but I cannot for the life of me figure out how to change the template location. Even if I delete the folder, every time I run SSMS, it creates a new folder where it used to be.
I'm guessing I just missed an option somewhere (possibly the XML section?), but any pointers would be appreciated.
In case it matters, I want to move the default location from "Documents/SQL Server Management Studios" to "Documents/Programming/SQL Server Management Studios"
Edit: I already changed the file path on the Import and Export settings, and the Query Result -> SQL Server tabs.
Don't know about moving the entire location for SSMS, but if you are looking to modify the core templates that keep reloading, see below.
I have always kept my go-to scripts in the Templates and to keep things clean, I've always first bundled all the shipped templates to a separate folder. You have to do this not only in your local instance first, but also the location they pull from each time you open SSMS, or it will always keep adding the default templates (and their folders) whenever you open SSMS.
If you have already opened your Template Explorer, edit one of the files in there (Right Click > Edit) to open it. On the instance that opened, right click on its tab and select Open Containing Folder.
Close SSMS and then delete all but your custom templates from the location that opened. Make a backup of your custom templates somewhere else on your PC, just to be safe.
DO NOT OPEN SSMS YET!! Doing so will rebuild the core templates in your SSMS instance.
Open the following folder path: C:\Program Files (x86)\Micorost SQL Server\120\Tools\Binn\ManagementStudio\SqlWorkbenchProjectItems\Sql
That is where the default templates reside. What I do is create a new folder called "__SQLDefault", then move everything except Sql.vsdir and SQLFile.sql to the __SQLDefault folder (Or whatever you called it). This is in case I ever want to reference any of the core templates...they are still there just in a separate, single folder. If you don't want any of the core templates to be preserved, the other option would just be to delete everything (except Sql.vsdir and SQLFile.sql) instead of putting them in a folder.
Once the files are moved or deleted, now open SSMS and your template explorer should just have the _SQLDefault folder in it (or not if you deleted everything), along with your custom templates that you didn't delete earlier. If your custom ones are gone, just add them back from your backup.
Try changing the Import and Export Settings.
What helped me was editing the registry and Value for DefaultFileOpenLocation
HKEY_USERS\S-1-5-21-1428394981-1396028598-1721912238-1000\Software\Microsoft\SQL Server Management Studio\18.0_IsoShell

Resources