environment

How to use environment variable inside a quoted string in BASH script

I've tried various forms of the following in a bash script: #!/bin/bash svn diff $@ --diff-cmd /usr/bin/diff -x "-y -w -p -W $COLUMNS" But I can't get the syntax to correctly expand the COLUMNS environment variable. I've tried various forms of the following: svn diff $@ --diff-cmd /usr/bin/diff -x '-y -w -p -W $COLUMNS' and svn d...

How do I print a SET command in a Visual Studio 2008 build?

I want to see all of the current environment variables during a build. I'd like to do this in the pre or post-build steps if possible because I don't want to edit the Targets file. This could print to the Output window or to a file. I've tried a number of different ways without success. I'm using Visual Studio 2008. Thanks! ...

Change current directory from a script

Hi, everybody! Is it possible to change current directory from a script? I want to create a util for directory navigation in bash. I have created a test script that looks like the following: #!/bin/bash cd /home/artemb When I execute the script from the bash shell the current directory doesn't change. Is it possible at all to change...

Staying consequent when working with large scale projects.

Hi there folks. Probably a bit off topic question, but it's something I'm really interested in getting to know from other people with different experience and backgrounds. How do you keep track of your huge projects? Do you use subversion? EER-models? Do you write notes? Does all your faith lie in phpdoc? Which framework do you use, and...

Use Ruby to permanently (ie, in the registry) set environment variables?

On Windows, how can I use Ruby to permanently set an environment variable? I know I need to change the registry (through the win32ole module?) but I am a novice with regard to scripting the registry. I understand that I can say ENV['FOO'] = "c:\bar\baz" to set the environment variable FOO for the session. However, I am instead interes...

Setting up windows for C++

To quote the FAQ, 'No question is [...] too "newbie"' What is the best way to set up an Windows system (vista, if that matters) to work with C++? Preferably with a nice IDE, easy compiling of software (support for make files, etc.), but suitable for a beginner. I would quite like the IDE to use a relatively portable format, such as ma...

Running JBoss 4.2.3 and JBoss 5.1 on the same server

I want to run JBoss 4.2.3 and JBoss 5.1 on the same server, but not simultaneously. I just need to be able to switch back and forth between the two for testing, so I don't need to change ports or anything like that. My problem is the JBOSS_HOME environment variable. When I set up a /soft/JBoss-4.2.3.GA directory and a /soft/JBoss-5.1.0.G...

Implementation details for SystemPropertiesAdvanced.exe (specifically SYSDM)

I'm investigating how C:\Windows\System32\SystemPropertiesAdvanced.exe on Windows 2008 interacts with explorer.exe when updating system environment variables. When updating environment variables this way, explorer.exe will dynamically update its environment block to pick up the changes. I'm aware of multiple ways, to remotely inject en...

Including phonon environment setup in Qt Creator

On Windows XP, I ran "configure", and Qt says that I'm configured to use phonon, but I'm not sure how to set up my environment correctly in Qt Creator. According to the Qt documentation, I need to call: Set DXSDK_DIR=C:\Program Files\Microsoft DirectX SDK (February 2007) %DXSDK_DIR%\utilities\bin\dx_setenv.cmd C:\program files\Microso...

How can an application access the environment variable set by another application?

In this case the application which sets the environment variable is executed in/from the application that needs to access the env.var. The Main() Return Values (C# Programming Guide) msdn article discusses its use within a batch file. If I try the same, everything is fine; but what is required is to run not from a batch script but from w...

How to handle .modulesbeginenv file for simultaneous logins from different platforms when home directory is shared across those platforms?

We use the environment modules system to manage unix environment variable setting for our platform zoo (irix, solaris, suse, cygwin and others), and to manage different software version sets. The environment modules package uses the $HOME/.modulesbeginenv to capture the initial state of the environment, but if the home directory is shar...

How can I pass the environment from my Python web application to a Perl program?

How do I set Perl's %ENV to introduce a Perl script into the context of my web application? I have a website, written in a language different from Perl (Python). However I need to use a Perl application, which consists of a .pl file: #!/usr/bin/env perl "$ENV{DOCUMENT_ROOT}/foo/bar.pm" =~ /^(.+)$/; require $1; my $BAR =...

config.gem in environment.rb

Let's say in a Rails app you have some gems that you use in your app (we'll call them "primary gems") and you have vendored them for portability. Let's say that those "primary gems" also require gems of their own - we'll call these "secondary gems". When you are setting up your environment.rb, you have to say: config.gem 'primary-gem...

What is the quickest way to compare two servers' IIS settings?

I am having non uniform results for applications running on two Windows 2003 Servers running IIS. Is there a way to quickly dump IIS configurations to a file for comparison? Are there good tools to compare two IIS servers? ...

How to test HQL queries?

I'm searching for a fast (really fast) way to test changes to hibernate queries. I have a huge application with thousands of different HQL queries (in XML files) and 100+ mapped classes and i dont want to redeploy the whole application to just test one tiny change to a query. How would a good setup look like to free me from redeployment...

Where do you find quiet places to code?

I'm currently working at home, but it's not always an ideal environment for coding. Where do you go when you need a quiet place to work for several hours. ...

Apache2: Environment variables for user http

Hello, Is it possible for the apache2 user, http, to have environment variables like normal users do? How would I go about setting those up, if possible? ...

How do I sudo environment?

I am using spamassassin in a php script, but when I train spamassassin as my user the php script's exec command to call spamassassin get the untrained version because of the user specific nature of sa-learn. So I need to sudo to my user in the exec command and get the environment of my user along with the premissions ...

How can I get the current user directory?

Using this: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) I get this output: "C:\\Documents and Settings\\[USER]\\Application Data" How can I get "C:\\Documents and Settings\\[USER]\\" ? ...

Where should ASP.NET apps store data files?

I have an ASP.NET page that will run on a shared hosting service (e.i. I'm leasing space on a single server that also serves content for other people) and I need a way to find a directory that I can save files in and that will not get hosted as web content. The file will be long lived and should be the same across sessions, visits, etc. ...