How to get Terraform arguments list by using keyboard shortcuts in Mac VScode? HashiCorp Terraform plugin does not work - macos

I have encountered a problem that when i try to check/get the arguments in Terraform blocks like resources, Terraform. My Mac Vscode does not work automatically shows up some argument list for me to choose. And I am wondering how to configure it and what's the combination of keyboard shortcuts to increase my efficiency?
I have installed the HarshiCorp Terraform plugin in Mac Vscode.

You should install Terraform on your machine before, then install Hashicorp's official Terraform extension, if it's already installed upgrade it (seems that their bug is fixed now)
Then, on your VS Code press CMD+Shift+X And make sure that your extension is enabled.
Also, try reloading your extension by reloading your window as their documentation states:
You can reload the Terraform extension by opening the command palette
and starting to type Reload. A list of commands will appear, select
Reload Window. This will reload the Visual Studio Code window without
closing down the entire editor, and without losing any work currently
open in the editor.
After you install Terraform and the extension, you should have VS Code open in the same directory where you ran terraform init as it will load your locally installed modules and loads your providers' configuration. For example, if you are pulling modules from a private registry the module documentation may not detect your schemas and then it won't offer autocompletion capabilities.
If you still have issues refer to these links:
https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform#troubleshooting

Related

Is there a way to store a list of commands in Visual Studio for Package Manager Console

We're switching from a classic Desktop application project, where everything fitted nicely within Visual Studio, to an Angular Web Project, where everything seems to be scattered over different environments all over the place.
One of the changes is nuget packages, which makes me feel like we're back in the 80's, where everything needs to be done with commands in Command Prompt, instead of just using buttons and menus. I find this slightly annoying, as now you have to remember a long list of commands where previously you could just remember a button's location.
Is there a place where you can store a list of commands that you can browse in your Package Manager Console? For instance, if I forget the command that script my model into SQL Scripts, I can just browse the list, instead of looking for the email where a colleague told me what it was?
The Package Manager Console is a PowerShell session, so you could create a PowerShell script Module with everything in it.
And even load from your profile (for package manager specific use file: run $profile.CurrentUserCurrentHost in the console to get the path).

Cannot see all my functions when running Open CPU single-user server

When I run ocpu_start_app("my_package") not all the functions are displayed and I cannot access those that are not listed, although they are under the my_package/R/ folder as the OpenCPU documentation states.
In my case, it seemed to be an issue with roxygen2. This package creates the documentation and the NAMESPACE file that OpenCPU uses. For some reason, roxygen2 wasn't executing automatically when I built my package from RStudio (Ubuntu 18.04). So I had to run manually roxygen2. You can do this in several ways:
From roxygen2 documentation:
roxygen2::roxygenise(), or
devtools::document(), if you’re using devtools, or
Ctrl + Shift + D, if you’re using RStudio.
After this, I just had to rebuild my project and relaunch the OpenCPU single server and all started working again.

Install Resharper Extension using PowerShell

We are looking at using PowerShell provisioning scripts for developer VMs and can install ReSharper via PowerShell, but I have not yet found anything on how to add the extensions for VS (currently hoping to add StyleCop) so that the developer experience is set up and configured as completely as possible without manual intervention.
Has anyone managed to achieve this?
I can give you a rough idea how to continue with that, since I've tried to achieve the same, but didn't have time to complete it:
Download ReSharper installer. Either via fixed URL, or parse the service output to get the latest version.
Generate a command-line invocation string. Similar to: installer.exe /VsVersion=12.0;14.0;15.0 /SpecificProductNames=ReSharper /Silent=True
Invoke the installer.
For plugins:
Download the plugin: https://resharper-plugins.jetbrains.com/api/v2/package/<packageName>
Extract to %localappdata%\jetbrains\plugins.
Adapt the config file in AppData\Roaming\JetBrains\ReSharperPlatformVsXX\XX
Reinvoke the installer.
I'm not 100% sure though about all of this. The second installer invocation might include an additional switch, but you should find out by manually installing a plugin, and checking with ProcMon.

How to get mageinferno/magento2-docker-compose setup to install an extension?

Using the docker compose playbook here, I cannot figure how to then use the admin panel to install an extension.
We have the auth.json file present in our user's ~/.compose/auth.json file, and is mounted in the proper container as suggested by the README. However it's not clear how to run the setup container with the M2SETUP_USE_ARCHIVE env variable set to false. Doing so fails always.
So far, the only thing we got to work is a Magento 2.1 instance, but the Admin panel seems to be missing functionality (The Components Manager is missing from the System tab for example).
How to get that setup to work properly? What's the best way to have a clean Magento instance with extension support to play with?

FireFox API install extension

How do I install, update, uninstall FireFox extensions on Windows?
The article (https://developer.mozilla.org/en/Adding_Extensions_using_the_Windows_Registry) seems like a legacy information...
I have installed FireFox 3.6.3.
However, I don't see "HKEY_LOCAL_MACHINE\Software\Mozilla\Firefox\Extensions" in my registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla]
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox]
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\3.6.3 (en-GB)]
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\3.6.3 (en-GB)\Main]
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\3.6.3 (en-GB)\Uninstall]
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox 3.6.3]
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox 3.6.3\bin]
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox 3.6.3\extensions]
For example, I want to install my_ext.xpi (ID: my_ext#my_site.com, Path: c:\myapp\ff_addons\my_ext.xpi).
Could you talk me how can I install my extension ?
Which firefox's versions support this method ?
The extension registry key (HKEY_LOCAL_MACHINE\Software\Mozilla\Firefox\Extensions) doesn't exist by default - simply create it and register your extension there as detailed in Mozilla's instructions (which you linked to).
This method has been working fine for me for over a year now.
You also have another option (which also works on non-Windows machines): Installing Extensions
The windows registry method is not a legacy method, and it's the supported way of installing an add-on for all users on a machine (and all Firefox profiles).
I'm curious as to why you felt it was a legacy method.
Are you talking about an extension or a plug-in?
Extensions are generally installed by having Firefox open an .xpi file. And .xpi files are just .zip files with a manifest (.rdf) and your various scripts and libraries. You can install it manually by creating the right directory structure. On my machine extensions live here: C:\Users\[username]\AppData\Roaming\Mozilla\Firefox\Profiles\[random-number].default\extensions. You create a subdirectory there called yourextension#yourcompany.com and then unzip the contents of your XPI inside the subdirectory. The next time the user re-starts firefox, your extension will be installed. There are a few gotcha's though:
Users have to manually restart Firefox.
You don't know which profile to use if there is more than one. The profile is identified by the [random-number] above. Many users have more than one profile.
On Mac and Linux this is a different directory, though the same basic idea applies.
Plugins are things like Flash that run inside a webpage. You can install those by setting a registry key, but I think in general there is a well-known folder where Firefox looks and loads anything that starts with NP (e.g. NPSWF32.dll). Seriously, it looks for NP. And each plugin must export certain NPAPI functions that Firefox uses to negotiate... stuff.

Resources