specific config by environment in Scala

Another strategy I’m using consists of using includes. I usually store my DEV settings in the default application.conf file then I create a new conf file for other environments and include the default one. Let’s say my DEV conf application.conf looks like this: myapp { server-address = “localhost” server-port = 9000 some-other-setting = “cool !” … Read more

Can envsubst not do in-place substitution?

Here is the solution that I use: originalfile=”file.txt” tmpfile=$(mktemp) cp –attributes-only –preserve $originalfile $tmpfile cat $originalfile | envsubst > $tmpfile && mv $tmpfile $originalfile Be careful with other solutions that do not use a temporary file. Pipes are asynchronous, so the file will occasionally be read after it has already been truncated.

What is the difference between an inline variable assignment and a regular one in Bash?

The format VAR=value command sets the variable VAR to have the value value in the environment of the command command. The spec section covering this is the Simple Commands. Specifically: Otherwise, the variable assignments shall be exported for the execution environment of the command and shall not affect the current execution environment except as a … Read more

ElasticSearch and Java environment variable

STEP 1 Can you verify JAVA_HOME is set to C:\Progra~1\Java\jdk1.8.0_20, C:\>echo %JAVA_HOME% Also, verify java command is available, java -version Reference Check if JAVA_HOME is present in environment using batch script STEP 2 If JAVA_HOME is not set, please follow the steps provided here – How to Set Java Home in windows Summary , Right-click … Read more

Is there a way to get my emacs to recognize my bash aliases and custom functions when I run a shell command?

Below are my comments about what I think was a related question: I think both M-x shell-command and M-x compile execute commands in an inferior shell via call-process. Try the following in your .emacs (or just evaluate): (setq shell-file-name “bash”) (setq shell-command-switch “-ic”) I notice that after evaluation of the above, .bashrc aliases are picked … Read more