Questions tagged [env]
221 questions
14
votes
3 answers
Set global environment variable out of Node.js
I am trying to set a global environment variable out of my node.js app.
The goals are:
When restarting the APP, the environment variable should still be set
When opening a new shell, it should be usable
If possible: When rebooting, same as 1.
It…
user3984802
11
votes
2 answers
.htaccess test if ENV is true or defined
I need to run a set of RewriteCond statements if an ENV is true or defined (if not defined, then presumed false). I've been trying to use:
RewriteCond %{ENV:IS_MOBILE} ^true$
RewriteCond ...
and (not sure if this is even valid)
RewriteCond…

Ashley
- 5,939
- 9
- 39
- 82
11
votes
2 answers
How to export env variable from npm script?
I know we can declare env variables to be used inside the script run by npm run command like so:
TEMP_VARIABLE=value node app.js
But if I need to use the declared variable across multiple npm run scripts, then it will lead to duplicate the effort…

codneto
- 2,319
- 3
- 24
- 36
11
votes
3 answers
run python script directly from command line
#!/usr/bin/env python
I put that at the top of a script. I've seen that should make the script runnable from the command line without the need for python programname.py. Unless I'm misunderstanding I should be able to use programname.py as long…

confused
- 1,283
- 6
- 21
- 37
10
votes
5 answers
%ENV doesn't work and I cannot use shared library
I cannot use %ENV var on my Perl script to use Oracle libs.
BEGIN {
$ORACLE_HOME = "/usr/lib/oracle/10.2.0.3/client64";
$LD_LIBRARY_PATH = "$ORACLE_HOME/lib";
$ORACLE_SID="prod";
$ENV{ORACLE_SID}=$ORACLE_SID;
$ENV{ORACLE_HOME}=…

Daniele
- 125
- 1
- 8
10
votes
2 answers
Python replacements for RVM/Bundler/Capistrano
I'm just moving over from Ruby/Rails development to Python/Django and i'm trying to find the best replacements for RVM/Bundler/Capistrano but it seems to be a total mess?
I've found these so…

Andreas
- 240
- 3
- 16
10
votes
2 answers
env -0 dump environment. But how to load it?
The linux command line tool env can dump the current environment.
Since there are some special characters I want to use env -0 (end each output line with 0 byte rather than newline).
But how to load this dump again?
Bash Version: 4.2.53

guettli
- 25,042
- 81
- 346
- 663
10
votes
3 answers
Mismatch between sys.executable and sys.version in Python
There are two Python interpreters installed:
[user@localhost ~]$ /usr/bin/python -V && /usr/local/bin/python -V
Python 2.4.3
Python 2.7.6
Sudo changes PATH for every command it runs as follows:
[user@localhost ~]$ env | grep PATH && sudo env | grep…

Piotr Dobrogost
- 41,292
- 40
- 236
- 366
9
votes
6 answers
Set location of laravel .env
So I just published a build of laravel to my production server. But the .env file was readable when I uploaded it. So I uploaded it to root of my site next to the public_html/ directory.
My question is: How to tell laravel where the .env file is…

Sjoerd de Wit
- 2,353
- 5
- 26
- 45
7
votes
4 answers
Setting environment variables for Phusion Passenger applications
I've set up Passenger in development (Mac OS X) and it works flawlessly. The only problem came later: now I have a custom GEM_HOME path and ImageMagick binaries installed in "/usr/local". I can put them in one of the shell rc files that get sourced…

mislav
- 14,919
- 8
- 47
- 63
7
votes
1 answer
Whoops, looks like something went wrong. Laravel 5.1
I have a route like this
http://localhost/inspection/show/{id}
When I try to load the route at the same time. In different tabs, sometimes some of those tabs has the error "Whoops, looks like something went wrong"
Loading in different tabs so…

MaTiUs77
- 106
- 1
- 7
7
votes
1 answer
PyYaml parsing of the Environment variable in the Yaml configuration file
I need to read follow yaml-formatted configuration file:
version: 1
disable_existing_loggers: False
formatters:
precise:
format: "%(name)-15s # %(levelname)-8s # %(asctime)s # [Line: %(lineno)-3d]: %(message)s"
datefmt: "%Y-%m-%d…

Yigal
- 71
- 1
- 4
7
votes
3 answers
How can I take STDIN and use it on the bash shell to set an environment variable?
I'm trying to get better at one-liners here, this is what I have currently.
$ echo $PATH
/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
What I want to do is strip off that first chunk, so here's what I've…

Tom
- 330
- 4
- 15
6
votes
2 answers
sharing .env files with team members?
Just starting to dabble using laravel, and they encourage the use of .env files for development.
Its recommended that you do not commit these files into version control, so when a new developer on your team comes to start working on the project,…

owenmelbz
- 6,180
- 16
- 63
- 113
6
votes
2 answers
Including environment variables in uWSGI ini files?
I am using .ini files (as per uWSGI docs). It's good practise to use environment variables, but I wasn't able to get the $+environment name syntax working.
Is there a special syntax I can use to access them?

stackoverflowuser95
- 1,992
- 3
- 20
- 30