scripting

Speed Up PowerShell Scripts in V2?

Hi, I'm running a number of scripts using PowerShell V2, and I have noticed a long pause when the console window first loads. What can I do to improve the performance of my scripts? Thanks, MagicAndi ...

How do I use SMO in PowerShell to script slightly altered objects?

I'm trying to generate scripts from a database, but with slight modifications to those objects. For example, I want to generate the script for a stored procedure, but I want the script to create it under a different schema. I have an example of what I'm currently trying below. If I'm going in a completely wrong direction then please poi...

Translate file access mode setup tasks from IIS 6 to IIS 7

I have an installer that installs and sets up an intranet web site 'ABC' under the Default Web Site. The ABC site directory is set up to have anonymous access enabled and Windows authentication disabled, so all the pages under the site inherit that access behavior. However, one page that lets users logon with Windows authentication has t...

Need ideas for reprocessing images using attachment_fu

Hi, I discovered a bug in my Rails app due to Rails app and gems upgrades and undocumented code from the previous developers. I have a lot of images that have been processed, but not sized correctly using attachment_fu. All of the images that were uploaded since the upgrade need to be resized correctly. Does anyone have any ideas to ...

Tools, scripts for working with SQL Server 2008

Hi, While working with DB, I find useful using some tools, that help me to solve DB problems. Some of them are: 1) Insert generator 2) A tool that can execute a script on a list of DB's 3) Finding a text in stored procedures and functions. 4) DB Back up scripts My question is, what are most useful tools, scripts(anything else), ...

ImageMagick bash script issue

// This works convert ${path}${dst} -crop ${crop} ${path}${dst} // but when changed to this, it fails convert ${path}${src} -trim ${path}${dst} convert ${path}${dst} -crop ${crop} ${path}"pdf_"${dst} What am I doing wrong? ...

Timeout of curl_exec can terminate the script?

I am using PHP script for some backend tasks(not web) and I found sometime curl_exec will terminate the executing of script without outputing any errors. I want my script to run in a loop forever and any idea about this? ...

Is there something similar to jEval for C# / .net ?

I'm looking for a language that will parse mathematical expressions for me pretty easily, but also be able to call functions and reference variables as needed. Jeval looks to be what I'm looking for, but unfortunately I'm working in C#. Is there a .Net based equivalent to jeval? ...

PowerShell Script to Find and Replace for all Files with a Specific Extension

I have several configuration files on Windows Server 2008 nested like such: C:\Projects\Project_1\project1.config C:\Projects\Project_2\project2.config In my configuration I need to do a string replace like such: <add key="Environment" value="Dev"/> will become: <add key="Environment" value="Demo"/> I thought about using batch ...

I write barely functional scripts that tend to not be resuable and make the baby jesus cry. Please help me stop the tears.

I received a request to add around 100 users to a linux box the users are already in ldap so I can't just use newusers and point it at a text file. Another admin is taking care of the ldap piece so all I have to do is create all the home directories and chown them to the correct user once he adds the users to the box. creating the direct...

Same script, working on a site, not working on the other!

Hello, First of all I apologize in advance for this question, a bit off the rang of stackoverflow, but I've spend a day trying to solve that issue and I'm totally stuck. The issue: The search function of my script (php) works perfectly fine on one host but not on the other. If you search something here : edu-cafe.com, you'll get a resu...

Scripting wget to populate a webapp

Can I use wget to populate some forms in a web app if the web app requires a user to login? I'm trying to use wget in a script to send some data to a web app, but it appears the web app rejects the attempts because I am not logged in. ...

Bash script: bad interpreter

Question: I get this error message: export: bad interpreter: No such file or directory when I execute this bash script: #!/bin/bash MONO_PREFIX=/opt/mono-2.6 GNOME_PREFIX=/opt/gnome-2.6 export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH export C_INCLUDE_PATH=$MON...

Portable shebang line

#!/usr/bin/perl This is the shebang line to a lot of scripts I'm writing lately. Hard coding the path of the binary seems like it could create some problems. For instance, if one of my users has Perl installed at /something_else/bin then they'd have to change all the shebangs. I've seen some tools that will automatically replace the ...

How to automate MS Outlook

I have to generate an email at end of the day (daily-status) which is templated. I have add tasks to different list and on the top, I have to have count of these tasks such as: X Tasks: 2 of 5 Y Tasks: 3 of 5 X Tasks: X Task 1 X Task 2 Y Tasks: Y Task 1 Y Task 2 Y Task 3 I don't want write co...

Receiving Text From Another Application

Hi, I'm building some home automation software with Cocoa/Objective-C. The main application will have a minimal GUI and will most likely be represented by a status bar icon only. I'm using proprietary speech-to-text software (MacSpeech Dictate) that takes my voice command and converts it to plain text. I then need to send this plain te...

Are there any free .NET OCR libraries that will perform OCR on an application window directly?

I am looking for a free .NET OCR library that will be able to do OCR on a given application window or even a image in memory (I can take a snapshot of the application window myself). I have looked at tessnet2 and MODI but both require an image located on disk. I need to use OCR because the application I am trying to write a script for ...

Win32 script environment for testing http redirects?

The past few days I've been working with setting up an Apache server on Windows. The server is supposed to host several .htaccess files, each redirecting (or, in some cases, proxying) to different hosts. I want to create tests for these redirectons, and the solution I'm currently considering is a CGI script running on the same server, ...

What scripts should not be ported from bash to python?

I decided to rewrite all our Bash scripts in Python (there are not so many of them) as my first Python project. The reason for it is that although being quite fluent in Bash I feel it's somewhat archaic language and since our system is in the first stages of its developments I think switching to Python now will be the right thing to do. ...

rss headlines display as marquee text on c#.net web form?

What is the best way or what is the best script that rss headlines display as marquee text on c#.net web form? ...