What is the proper syntax to use multiple secret_environment_variables in github actions when setting up a cloud function? - google-cloud-functions

The only resource I can find for setting up secret_environment_variables is from this link
https://github.com/google-github-actions/deploy-cloud-functions
but there is not much documented about how to add multiple secrets from secrets manager.
According to the document I set mine up as
secret_environment_variables: 'SECRET_NAME=projects/projectid/secrets/secretsid/versions/versionid'
This only seems to work for one secret. I tried different ways like stacking them, using comma separation, keeping them on 1 line. But I cannot find a way to get multiple variables and I cannot find documentation that explains the how.

From testing a few ways this is how I got it to work.
secret_environment_variables: 'SECRET_NAME=projects/projectid/secrets/secretsid/versions/versionid,SECRET_NAME=projects/projectid/secrets/secretsid/versions/versionid'
It has to be in the same line and in the same string.

Related

what are 'NET USE' possible outputs?

The question is : what are the NET USE possible outputs?
You can drown yourself with websites explaining how to use NET USE command, but not a single one about what is coming out of it.
In my case I'm interested in the various error messages, and the interaction with the Powershell automatic variable $LASTEXITCODE. I want to handle its output correctly but I don't know what can even happen (and no, I won't use New-PSDrive).
Does someone knows the what or where I can find the information ?
Thanks
You can use the example in https://www.compatdb.org/forums/topic/20487-net-use-return-code/ to obtain a list of the numerical codes for your evaluation.
If you want to dig deeper take you need to download the Win32 SDK and go through the definitions in the header files (see https://learn.microsoft.com/en-us/windows/win32/api/winnetwk/ns-winnetwk-netresourcea etc).

Is there a API version of .getBackgrounds() such as Values.Get() vs getValues()

With some community support I recently learned how much faster Values.Get() is versus getValues(). I've been upgrading one of my projects code to use these new commands. As I go through and try to change over all of my read/write commands I've found that I use .getBackgrounds(). I haven't been able to find the equivalent API command to get the background colors. I presume it doesn't exist and that I'll need to continue to use .getBackgrounds(). Just wanted to make sure I wasn't missing anything.
Thanks!
There is Sheets.Spreadsheets.get which gives you a spreadsheet json. Backgrounds will be at
sheets[].data[].rowData[].values[].cellData.effectiveFormat.backgroundColor

Labview using output multiple times

I have a case structure and inside it I have a Boolean output to a LED. I want to use the LED again in another case, but whenever I try to copy the output it just creates a new one with a new LED. Is there a way to have them go to the same LED? I will also need to do this with the inputs, but I am guessing that it is a similar procedure.I cant wire it to the outside, because I need it to change it while it is inside some other loops. An image of the program is below. Sorry that it is messy this is my first code. Thank you for your help.
Current Use of LED:
Where I want to add it:
If it is not possible please let me know as well.
What you need to do is use local variables. If you right-click on the LEDs and select Create>Local Variable it will allow you to write to them in more than one place.
But Caution: If you do this a lot your code will get very difficult to work with. In this case, you have no choice since you can't place them in one place where they can wired from both sources but I always recommend trying to wire them first if you can.
What jamesmc86 says is correct.
However, to give you a complete overview, and if you want to use a tool that has already a built-in error terminal, you could use property nodes. In this case, you should select Value property node.
Check them out, they are very powerful and allow you to change all properties of a control/indicator.

Azure ARM Template (JSON) Self-Reference

I'm creating some default "drag and drop" templates for our developers, and one section is the required tags. Most of the tags reference a variable: nice and easy. But one wants to reference the resource itself and I cannot figure out a way to it. Does anyone have any suggestions?
The tag itself is called "Context" and it's value should be the "type" of the resource it is in, e.g. "Microsoft.Web/serverfarms". This is desired to aid with billing. Obviously I could either create a different template per resource type (not ideal considering the number of different resources) or rely on the devs to update the field manually (not ideal either as relying on them to add the tags manually hasn't worked so far in a lot of cases), but I am trying to automate it.
Extrapolating from the [variables('< variablename >')] function I did try [resources('type')] but Azure complained that "resources is not a valid selection". I thought it might have complained that it couldn't tell which resource to look at, but it didn't get that far. Internet searches have not turned up anything useful so far.
I can't find a way to do this cleanly either (I hope someone corrects me though! This is a topic for us too). The reference and resourceId functions look promising, but both are unavailable inside of the resources block, would require some parsing, and also require the api version, which you probably also need to vary by resource and so you're just back to where you started. ARM won't even let you use a variable for the resource type property(probably a good thing), so that option is out too.
As such, you'll either have to live with your team having to replace that chunk of text manually or pursue some alternative.
The simplest thing that comes to mind would be to write a script in a language that understands JSON. That script reads the template, adds the tag to the resource, then saves the template again.
A similar approach would be to do it after the resources are deployed by writing a script that loops through all resources and making sure they have the tag. You can use automation to schedule this on a regular basis if you're concerned about it being missed. If you're deploying the templates using a script, you could add it in that script too.
There's some things you probably do with nested templates, but you probably wouldn't be making anyone's life easier or making the process more reliable.
This could be achievable potentially through some powershell specifically around Resource and Resource Group. Would need to run a Get-AzResource either at the subscription or potentially just the resource group level. Then pull the ResourceType field from the object return and use a Set-AzResource command passing in the ResourceID from above and the new tag mapped to the returnedResourceType field.

ChromeDriver prevent detection

From various other questions here on SO etc. it is clear that one of the main reasons for websites being able to detect Selenium/ChromeDriver is being used, is the javascript property
document.$cdc_asdjflasutopfhvcZLmcfl_
Is there anyway to prevent this property being created (that does not involve a custom build of ChromeDriver)? Like for example disabling this cache somehow? It would really be preferrable without a custom build. Perhaps with a configuration option of randomizing the property name.
Or would it be possible to somehow through the driver something like this:
delete document.$cdc_asdjflasutopfhvcZLmcfl_;
Initial testing seems to indicate that this does not work. Perhaps because a new cache is created just after executing this script, or similar.