How to resolve global variables in Rundeck? - global-variables

I tried adding my variable in:
{Rundeck-Path}/etc/project.properties
as
project.globals.test=myvalue
And trying to access it from an inline script as
echo #globals.test#
however it does not print the value, instead I get an empty string, any idea what am I doing wrong here?

The project.properties config isn't a "real file" anymore (on Rundeck 2.X and 3.0.X it does), that information is stored on the internal Rundeck Database.
To add globals on the project.properties follow these steps:
Go to your project.
Click on the "Project Settings" > "Edit Configuration" (left panel).
Then click on the "Edit Configuration File" button (up to right).
Add your project global variable like in the config: project.globals.myglobal=hello in a new line and Save.
Now if you print the #globals.myglobal# in any inline-script step, you can see the global content.

Related

I cannot set/change my working directory directly in my R code. Instead, I have to manually set it in the file browser tab

For some reason, I am unable to set or change my working directory in my R-code itself. I'll include a line such as:
setwd("~/Documents/BeaverProject/HOBOData/Beav")
But it will be followed with an error:
Error in setwd("~/Documents/BeaverProject/HOBOData/Beav") :
cannot change working directory
However, if I go to the file browser tab in the bottom right corner, and click "(gear icon) More", it provides an option to "Set as Working Directory" which I can use to change the working directory to the desired file folder.
While this works, it means that I can't just sit back and allow my code sequence to run because I have to manually change the working directory at every point in the code where it needs to.
Any suggestions?

In Goland, how can I hide test files underneath each non-test file?

In Go, it is "idiomatic" to place test files next to the files containing the code under test.
Regardless of whether or not this is a good software engineering practice, in Goland IDE you can hide tests underneath the code under test as if it were a subdirectory.
Where is this setting?
You can follow the instructions from this help page.
A quick reference is to do the following:
under the project view window
click on the cogwheel
select File Nesting...
click on the "Child file suffix" under ".go" extension
add "_test.go" to the list and click OK
Here's the file nesting option:
Once chosen, add the following:

Getting GPS to display my package subfolders

My GPS does not display the subfolders under "src" although they exist and are non empty. When I try to create a new subfolder from within GPS, it gets created but does not show under "src". I am using (community) GPS version 20180523 on Windows 10.
I have tried the following.
(1) I fiddled around with the folder display options in the top right corner of the project tab with no success.
(2) I aggressively hit the refresh button.
(3) I created the subfolders I want in Windows explorer.
How can I get my folder-organised code to show correctly in GPS?
Thanks.
In your project properties GUI, go under Sources->Directories and check the "Include Subdirectories" checkbox. To add it manually to your GPR file, open it and add "/**" to the end of your Source_Dirs option:
for Source_Dirs use ("src/**");

Default shortcut for Replace-Next in Atom?

Regardless of whether it were supposedly possible to customize this shortcut in the user preferences file (*) : is there actually a default shortcut for Replace/Replace-Next ? Following shows there is no hover-help on it:
(*) After many attempts I have never been successful for the keymap.cson to be respected by Atom. It just gets ignored. Thus I want to use whatever is the default binding for Replace[/-Next] .
No, there is no default shortcut for "Replace Next", only one for "Replace All" (ctrl+enter or ⌘+enter).
But there is a built-in command for it. Putting this in my keymap.cson file works for me:
'atom-text-editor':
'alt-cmd-e': 'find-and-replace:replace-next'
I found this example from here:
https://github.com/bronson/dotfiles/blob/master/.atom/keymap.cson
All of the default settings are here:
https://github.com/atom/find-and-replace/blob/master/keymaps/find-and-replace.cson
It sounds like you already know this, but just for reference, you can find your keymap.cson file by going to Settings (ctrl+, or ⌘+,), and clicking the "Open Config Folder" button.
If your keymap.cson is being ignored, I would start to diagnose the problem by commenting out everything except those two lines in order to see if another setting in keymap.cson is broken.

Set a shortcut in Atom editor for Go To Definition using go-plus

How can I set a shortcut in Atom editor for Go To Definition using go-plus. Thanks for your help in advance.
By default, the go-plus package uses Alt+Cmd+G to trigger the Go To Definition binding (as can be seen here). This binding will only work in files that use the Go grammar. Since Cmd is only available on Mac OS X, I don't know what keybinding other operating systems will use by default.
To redefine the keybinding, do the following:
Open the Atom Preferences, select the Keybindings section.
In the Search field, type 'go' to filter the list of keybindings.
Click the Copy icon next to the golang:godef keybinding.
Click the your keymap file link at the top.
This will open your keymap.cson file. Go to the end of the file and paste the copied content:
'atom-text-editor[data-grammar="source go"]:not(.mini)':
'alt-cmd-g': 'golang:godef'
Edit the keybinding to your liking and safe the file.
To verify the new keybinding, open the Key Binding Resolver view by selecting the Packages > Key Binding Resolver > Toggle menu entry. Open a Go file and press the keybinding you assigned, then watch the Key Binding Resolver view to see any conflicts.

Resources