scripting

How can I run some script code when an item is forwarded to an Exchange public folder?

I am working on a proof of concept for some workflow automation using Exchange 2007 public folders. I am trying to write some code that can be run any time an item is forwarded into a particular public folder - these items arrive automatically via email and are automatically routed by Exchange into this public folder. Primarily what I ...

How to issue "module load" in a shell or Perl script (i.e., non-interactively)

I can use the "module load xyz" command interactively, but when run from a script, it says it can't find the "module" command. Is there any way of loading modules in a script? ...

RAR Each folder in directory.

Hi All, Im only new to liux commands and spend most of my time in VB, after searching the web its hard to find a solution in google. Anyway...... Everyday I backup my Shares folder and ends up being 183 GIG, I tried many ways of backing it up and come to the conclusion that using rar was the best option for my enviroment. So this is th...

Wait for bash background jobs in script to be finished

To maximize CPU usage (I run things on a Debian Lenny in EC2) I have a simple script to launch jobs in parallel: #!/bin/bash for i in apache-200901*.log; do echo "Processing $i ..."; do_something_important; done & for i in apache-200902*.log; do echo "Processing $i ..."; do_something_important; done & for i in apache-200903*.log; do ec...

Variable length MATLAB arguments read from variable

I have a function with variable arguments, declared in the standard way: [] = foo ( varargin ) and I would like to call it from another function, but specify the arguments programmatically. My best attempt is something like the following: % bar isn't populated like this, but this is how it ends up bar = { 'var1' 'var2' 'var3' }; foo...

Script a new web application in IIS 7

I have a script using AppCreate to create a new application (virtual directory) in IIS 6. To get the script to work in IIS 7 I have to enable IIS 6 compatibility. What is the "right" way to script this in IIS 7 without having to enable a lot of different components that differ from the standard installation? ...

total size of group of files selected with 'find'

For instance, I have a large filesystem that is filling up faster than I expected. So I look for what's being added: find /rapidly_shrinking_drive/ -type f -mtime -1 -ls | less And I find, well, lots of stuff. Thousands of files of six-seven types. I can single out a type and count them: find /rapidly_shrinking_drive/ -name "*offende...

Extend my Java application with R?

Im building an application that i want to have extended with modules that does some nr crunching and i would like to have R for that. What are my best options for extending my Java application with R? ...

Java Code formatting using shell script

I know this is silly but I can't overcome my curiosity. Is it possible to write a shell script to format a piece of java code? For example, if a user writes in a code: public class Super{ public static void main(String[] args){ System.out.println("Hello world"); int a=0; if(a==100) { System.out.println("Hel...

Find Active Directory users home folder from login hook script in OS X

I need to write a OS X login hook script that is aware of the users current home folder. Since the users are Active Directory users, their home folders are not stored in /Users so I can't simply hard code the full path. Since the login hook is run by a daemon as root, I can not use $HOME, ~, etc either. The only piece of info I have i...

How To Deploy Your PHP Applications Correctly?

Hi All, How to correctly deploy applications from development to production and how to deal with multiple site configurations. All my development are done thru svn located at var/svn/myapp/trunk and the actual production code is in /var/www/myapp. I check out the latest code to my local machine into a directory called "myapp_latest_sv...

PHP web application installation

I've just finished a web application written in PHP. I thought it was as easy as compressing my .php files and dumping my database in order to decompress those files in the "production" server, creating the database structure and database user, but it doesn't work. Several php files have include directives that are not working, I was usi...

How to send an email from one Gmail account to another one using a batch file or script?

I need a tiny Windows script to send a 1 line email to Gmail accounts. I have tried many utilities that claim to do this such as BLAT, but none work. The script will be executed inside a batch file if certain conditions are met. Script can be in Perl, Python, VBScript, Java, it does not matter as long as it executes from a batch file. Pl...

Best way to automate tasks in windows

Mac has applescript 'built in' and I've found its pretty nice to work with for automating stuff. What's the best windows equivalent? ...

Does anyone know which gallery script is used here ?

Hi all, I came across this website and really liked their gallery, not sure if the script is in-house or came from some free/commercial script out there ? Thanks ...

What visual programming language works well for scripting admin tasks?

Would like a visual environment for creating admin scripts to manage tasks. ...

Xcode script for generating/synthesizing properties

Does anybody have an Xcode script for generating @property and @synthsize directives for instance variables in a class? ...

SQL Scripting Tool That Beats MS Query Analyzer?

I'm using MS Query Analyzer (as part of SQL Server 2000) to write T-SQL scripts to pull data out of a DB. This involves querying some tables, iterating through the results (using a cursor), some basic processing of the results and putting the processed data into another table. This is working pretty well as I can view the tables and stor...

Best website to store programming scripts online

I want a website where-in it will store all my (quick)scripts online. Sometimes I will writing a couple of python scripts to get this done like, getting the list of recent files added, getting the list of added files on a day, or something even more simpler. So I want to document those scripts on a daily basis. How do it online? Update:...

Java + Scripting languages (JSR 223)

I'm designing a Framework which I want to attach to the scripting language API to make it more versatile and easier to use (for some things I really prefer the scripting way myself ;). With languages like JRuby, Jython or Rhino (JavaScript) there are interpreters for many popular scripting languages available and as far as I read, all of...