Where can I modify global ignore.conf in macOS? - plasticscm

I've added a file extension to the ignore.conf but I marked the "Apply rule for all workspaces" and that adds it to another ignore.conf file that's not in my repository.
I'm on macOS and I can't find where that global ignore is. Googling found it for Windows but not for macOS.
Any ideas?

I guess you don't have a "plastic-global-config" repo so the client configuration in a macOS should be found in the following paths:
/Users/xxx/.plastic4/ignore.conf
or
/Applications/PlasticSCM.app/Contents/MonoBundle/ignore.conf

Related

Same VSCode-Settings for the whole crew?

We want to have the same VSCode settings for the whole crew of developers. Also it would be fine to have a oneline command to tear VSCode down and restart it from scratch with predefined settings and plugins so that you do not have to worry about trying out plugins and getting beck to the known state. Kind of Config-as-Code for VSCode.
I already found:
https://code.visualstudio.com/docs/editor/extension-gallery#_command-line-extension-management
https://github.com/microsoft/vscode-dev-containers
https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync&ssr=false#qna
https://github.com/gantsign/ansible-role-visual-studio-code-extensions
https://code.visualstudio.com/docs/remote/containers
https://github.com/gantsign/ansible-role-visual-studio-code
But non of these provides a good solution to me
We are using Mac and Windows machines and develop most of the time locally (not remotely in the cloud or the like).
I imagine like having a script like
.... projectname up
or
.... projectname reset
(or
.... projectname down)
to receive/reset the configured settings and newest plugins that have been configured for the project.
Have any ideas or use a similar solution already?
After doing a lot of research, playing with Docker, Ansible and so on... it seems that although I excluded it at first the plugin Settings Sync Plugin from Shan Khan is the way to go. It has round about 1 million installs!
Only dependency - you need a GitHub account to host your configs. That is what held me back at first - but it should be not that much of a problem to get one for everyone in the team and connect it to like a company-github-account.
Copy the files settings.json and keybindings.json to your target machine(s) to copy the settings. You can find those files here:
Win: ~\AppData\Roaming\Code\User
Mac: ~/Library/Application Support/Code/User/
Linux: ~/.config/Code/User
You can copy extentions from ~/.vscode/extensions or C:\Users\username\.vscode\extensions from linux/mac or windows respectively.
FalcoGer's answer should explain how to copy the files in a way VS Code will pick them up. If you only need to copy the config files once, this solution would be fine.
If you need to "sync" these config files on a regular basis, I would advise to create a Git repository where all config files will be stored.
When cloning the repo to local machines, you can symlink the files to the config destinations (see FalcoGer's anwser). Then when you need to "sync", you only have to run git pull and restart VS Code to apply the changes.
For your other script-related question, you could create a CLI for this. Python would be the most friendly way to do this. You can find an example here.

SourceTree breaks Path variable

I started using git-hooks in my project, and one of precommit-hooks uses clang-format.
On commit through SourceTree it fails to find clang-format.
Error: 'clang-format' not found.
But commit works, if I do this via terminal or via terminal inside SourceTree. After adding this line to git-hook, everything works in SourceTree.
export PATH=/usr/local/bin:$PATH
So looks like it doesn't work in SourceTree but I haven't found any bugreports about current version (Version 2.3.2)
Did I forget to enable some option somewhere in SourceTree or it should work by itself?
This is still an issue
If using a Mac opening Sourtree from terminal with
open /Applications/SourceTree.app/Contents/MacOS/SourceTree
Fixes the issue by getting the correct path
Or you can change the pre-commit script and add the path there with something like:
export PATH=/usr/local/bin:$PATH
Alternate solutions can be seen in
https://community.atlassian.com/t5/Bitbucket-questions/SourceTree-Hook-failing-because-paths-don-t-seem-to-be-set/qaq-p/274792
If you're using husky to manage git hooks, set the path from your terminal and retry. echo PATH=${PATH} > ~/.huskyrc
Since your terminal environment already has the right path set, this approach should hold until Atlassian actually fixes sourcetree bug.

How to transpiling dart to javascript in Phpstorm

I installed dart-sdk and downloaded dart plugin to Phpstorm 8.0.3, but I cant figure out how to transpile dart to js. When I am trying to make file watcher I dont have any Dart2Js predefined template in settings.
Thank you
I know only WebStorm 9 and 10. Maybe you can still derive how it might work in PHPStorm.
Usually you don't want to build to JavaScript on each file change because this would slow your machine down.
During development you use pub serve which is automatically launched by WS 9 and 10 and which transpiles Dart files to JavaScript only on demand (when requested by a browser) and only compiles what it didn't compile previously.
For deployment WebStorm can use the Pub: build ... context menu of the pubspec.yaml file in the project view.
See #Günter Zöchbauer answer.
Using dart2js is not the recommended approach, as it runs on file level instead of project, creates output in the src folder, etc. - but the main reason is that it is not clear when/why to use it. If you need to build your project, use 'pub build' (available in pubspec.yaml right-click menu). When debugging in browser, 'pub serve' is always used implicitly - it performs all needed transformations...
But, if you still need this watcher, you can easily configure it yourself by adding a watcher of 'custom' type.
Program: path/to/dart2js
Arguments: --out=$FilePath$.js $FilePath$
Working directory: $FileDir$
Output paths: $FileName$.js:$FileName$.js.map:$FileName$.js.deps

MSBuild cant find resgen.exe

I have a VM machine where I copied over the SDK files and path, went to the registry and added the keys to the registry, but I keep getting the error that resgen.exe cannot be found:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1835,9):
error MSB3091: Task failed because "resgen.exe" was not found, or the correct
Microsoft Windows SDK is not installed. The task is looking for "resgen.exe"
in the"bin" subdirectory beneath the location specified in the Installation Folder
value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\
Windows\v7.0A. You may be able to solve the problem by doing one of the following:
1) Install the Microsoft Windows SDK.
2) Install Visual Studio 2010.
3) Manually set the above registry key to the correct location.
4) Pass the correct location into the "ToolPath" parameter of the task.
I looked in the folder Microsoft\Microsoft SDKs\Windows\v7.0A and copied over the resgen.exe in practically every single net folder including the bin, but it keeps telling me that resgen.exe cannot be found. I have no clue what to do.
Make sure your environment variable path includes the folder in which ResGen.exe resides
Run Regedit to edit your registry. Look for the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows. If there is not already a Setting called "CurrentVersion", create a new registry setting "CurrentVersion" of type REG_SZ. Make sure it has the same value as the setting ProductionVersion in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A.
Make sure, you have the keys HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFX40Tools, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFX40Tools-x86 and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFX40Tools-x64 present in your registry and the value InstallationFolder set in each of them.
I added the following SdkToolPath parameter to the project and that helped. Of course it is not a full solution as it will not work on the buildserver, but for now it works and I just don't check it in from my machine and it means I can do what I need to:
<GenerateResource SdkToolsPath="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools" Sources="#(TextResource)" OutputResources="#(TextResource->'$(OutDir)CommandStrings.resources')" />

Bower install without ssl

I have trouble connecting to sites with ssl, i.e. https. It can successfully download artifacts from the internet if the url begins with http.
bower install will download dependencies via https. Is there anyway make it download via http?
I had troubles with this too, and I couldn't find an elegant way to fix it. My workaround was:
Go to your global npm folder and find the "bower" folder (on Windows 7 that is "C:\Users\\AppData\Roaming\npm\node_modules").
In that folder, search the default.js file placed in node_modules\bower-config\lib\util\default.js
Inside that file you will find a "var defaults". Replace the "registry" url property from "https" to "http".
Yes, I know. This shouldn't be done like this, but at least help me to bypass the connection error.
Hope that helps!
You can change the registry used by Bower in the .bowerrc file. The default registry is: https://bower.herokuapp.com and is defined in node_modules/bower-config/lib/util/default.js (as described by Jean Manuel Arias in his answer).
To override for your project, add a value for the registry setting in .bowerrc. An example file might be:
{
"directory": "<YOUR LIBRARY INSTALL DIRECTORY>",
"registry":"http://bower.herokuapp.com"
}
In the above example, the default https registry is being overridden with the http version. A full list of the available .bowerrc settings can be found at: Bower Spec.
You can do a global override for the current user by creating a %USERPROFILE%\.bowerrc file (for windows, in Linux it is: ~/.bowerrc). Bower follows a similar search path when applying settings to NPM (see npmrc settings). This is probably a better route as it avoids cluttering your project with local settings.

Resources