scripting

How to toggle the visibility of a script tag?

How do I toggle the visiblity of a <script> tag in the markup? Have the following javascript code in my master page: <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.j...

How can I run and end the script() linux command from Perl?

#!/usr/bin/perl $sim = "multiq"; `make SCHED=$sim`; `script > scripter`; `echo hi`; print pack("c", 04); ~ This script hangs when script is called. Not sure how to get the perl script to keep running. ...

Permanent line at the bottom of the console window in batch files

Hi guys, Just wondering if anyone knew if it was possible to have a permament line of text at the bottom of a cmd prompt window when running a batch file? So it floats, and if there is a lot of text flowing on the screen, and the cmd prompt starts to scroll, that line of text is still there at the bottom. Cheers, Tim ...

Developing in Ruby, on a Windows machine, is too counter productive?

It seems to be very counter productive in that so many gems will break on windows. I have been dealing with so many mysql and ruby-mysql gem problems (seg faults occuring in the gem itself, a class called UnixSocket apparently doesn't work well on windows machines, etc etc). I'm I just wasting my time here? Should I move onto a differen...

JavaScript FF IE Update + message script issue

Hello. I have this ajax_update script that updates file.php every 60 seconds.. Now file.php outputs this after updated a table: <div id='message' style="display: none;"> <span>Hey, <b><? echo $userid; ?></b>, You've got +1 points, you now have <u> <? echo $n["points"]; ?></u></span> <a href="#" class="close-notify" onclick=...

Installing scripts on IDA Pro

Around the net I've seen reference to "scripts" for IDA Pro, but can't work out how to load or install them for IDA Pro 4.9 Freeware Version. How do I do this? In particular I wish to use PE Scripts. ...

HTML script element localhost uri

Hi, This may seem like a silly question, but consider the following use of the 'script' element to import an external javascript file: <script src="http://localhost:8085/myscript.js" type="text/javascript" > Given that this is a url and not a file path, would this be evaluated server side or client side? If evaluated client side, t...

Using directory traversal attack to execute commands

Is there a way to execute commands using directory traversal attacks? For instance, I access a server's etc/passwd file like this http://server.com/..%01/..%01/..%01//etc/passwd Is there a way to run a command instead? Like... http://server.com/..%01/..%01/..%01//ls ..... and get an output? EDIT: To be clear here, I've found the ...

How to upload all .html files to a remote server using FTP and preserving file structure?

I have edited about 100 html files locally, and now I want to push them to my live server, which I can only access via ftp. The HTML files are in many different directories, but hte directory structure on the remote machine is the same as on the local machine. How can I recursively descend from my top-level directory ftp-ing all of the...

Recovering files from archive of CVS *,v files

I trying to recover some old source code (plain text) from a bunch of files that used to be managed with CVS. I have a directory containing all of the source code files in CVS's *,v file format. This looks mostly like the original files, but there are quite a bit of CVS specific header and revision information in there. Is there a simpl...

Basic bash script variable declaration - command not found

This seems like such a simple question I'm embarrassed to ask it: test.sh #!/bin/bash STR = "Hello World" echo $STR when I run sh test.sh I get this: test.sh: line 2: STR: command not found What am I doing wrong? I look at extremely basic/beginners bash scripting tutorials online and this is how they say to declare variables... S...

Useful F# Scripts

I have been investigating the use of F# for development and have found (for my situations) building scripts to help me simplify some complex tasks is where I can get value from it (at the moment). My most common complex task is concatenating files for many tasks (mostly SQL related). I do this often and every time I try to improve on m...

In Xcode, how to exclude a file with a set name from being put in the app bundle

When I start an Xcode project I drag in a blank readme.txt file that I use to take notes with while I'm figuring things out. The thing is, the file gets put in the app bundle at build time. Then I have to deselect it in the Detail view so that won't happen. Is there a way to automatically exclude a file with a known name from every bui...

What's wrong with my Nant Record task?

Hey everyone... I have the following in a build script: <record action="Start" autoflush="true" name="${nant.log}"/> The name value is valid. I get the following error message: Invalid element <record>.Unknown task or datatype. After looking at the documentation I am not sure why this is causing an error. Any ideas? ...

Can I use IF multiple times to switch between multiple options in PHP?

hey i got 9 type on my web. i have to set different keywords each type. with this script; if ($type = movie) { $yazdir = "DVDRip, DVDScr"; } elseif ($type = game) { $yazdir = "Full Version, Patch"; } i can write keywords for two type. how to repeat this correctly for other types? (echo paramether must be $yazdir) ...

Executing SQL from Script Component + SSIS

Am trying to execute sql from script component, but getting error when trying to establish SQL connection. My Code below in Script Component under PreExecute() base.PreExecute(); variables = null; VariableDispenser.LockForWrite("User::TableName"); VariableDispenser.LockForWrite("User::SqlConnectionString"); VariableDisp...

Script in IE to Insert Text at Cursor (in or out of IE)

I need to take text already obtained and stored in a variable and place it in another window: IE or any other windows application. Context: An asynchronous application is running in IE, most likely in the background, and when an event fires in the application, certain text needs to be inserted wherever the cursor/carrot is. I am no...

Bash alias to Python script -- is it possible?

The particular alias I'm looking to "class up" into a Python script happens to be one that makes use of the cUrl -o (output to file) option. I suppose I could as easily turn it into a BASH function, but someone advised me that I could avoid the quirks and pitfalls of the different versions and "flavors" of BASH by taking my ideas and mak...

Organising Javscript Files in Visual Studio

Hi Guys, Interested how others are organising their scripts in Visual Studio ? Currently, the project I am working on has a large number of scripts and getting confused how to organise them into an arrangement without something like <% if (Helper.IsDebug()) { %> <%=SOME SCRIPT%> <% } %> <% if (Helper.IsRelease) { %> <%=SOME SCRIPT%> ...

Can anyone recommend a property or real estate lettings/sales script or extension?

Hi, I've currently got a couple of potential property letting/sales agent web sites to do. I'm looking for a decent script or possibly Joomla extension to power the property search functionality. Can anyone recommend something they have used? ...