I'm trying to sandbox JSR-223. Specifically, I don't want any script to have access to any of my classes. (I hear Rhino can do that with ClassShutter, but I want to do it generally. ie. for all script engines of JSR-223).
I first tried to use the AccessController.doPrivileged solution, by passing no permissions at all. It works for most...
I frequently need to ssh into a server, but I can't ssh into it directly while I'm connected to our VPN. Thus, I have to ssh into another server and ssh into it from there. Is there any way that I can write a script and/or shell function for this? I've tried this, buit it gave me an error:
% ssh jason@server2 'ssh jason@server1'
jaso...
JS library like JQuery can be linked directly from other site (e.g. google). Usually I use
<script type="text/javascript" src="/js/jQuery.min.js"></script>
But I can use
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
or similar.
I like to take full control o...
I tried using $(date) in my bash shell script, however I want the date in YYYY-MM-DD format. How do I get this?
...
Is there a better way to create objects in IScriptControl than this?
Result := SC.Eval('new Date()');
I need something like this:
function CreateJSObject(JSClassName: string; Params: PDispParams): OleVariant;
a naive implementation would be
var
S: string;
begin
S := '';
for I := P.cArgs - 1 downto 0 do
begin
...
I am wondering is there a way to refresh the HKLM registry key HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer - without restarting the shell.
I would like to be able to do this without restarting explorer. Is there any known way to do that ?
So far, I found only this thing:
RUNDLL32.EXE USER32.DLL,UpdatePerUserSyste...
We are using SQL and have a script file to generate the Database and tables.
I am trying to write a generic script which will execute on all dev/prod machines
The file name which i am giving is FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\DBname.mdf'
It works on my machine but not on all the dev machine since al...
I'm not really sure how I can explain this, but here goes:
I want to be able to "insert" some commands into parts of my code which will be loaded from external files. To parse and execute these commands, I presumably have to use some scripting like BeanShell's eval method. The problem is that it doesn't seem to recognize the instance/me...
Hi there,
I've got a script written which does some steps to package my build for an Ad Hoc distribution. My first guess was to use a run script phase in my Ad Hoc target. But it looks like codesigning is fixed at the last position in the chain of building iPhone apps.
Somebody has a clue how can I run my script at the very last possib...
Classic ASP, VBScript context.
A lot of articles including this Microsoft one, say you cannot use FileSystemObject to read Unicode files.
I encountered this issue a while back, so switched to using ADODB.Stream instead, per the ReadText example here, instead of using FileSystemObject.OpenTextFile (which does accept a final parameter in...
I feel that there are a lot of quick uses for scripting languages that you may only think of if you have the shell open at all times. I leave a terminal tab open with python running and have solved many problems with a few lines of code typed off the top of my head. What are some of your less obvious uses for the scripting language of yo...
Do you know of a runtime written in Java/J2ME, that is capable of reading and executing a script/binary file?
...
I have a page that is referenced via a <script> tag from a page on another site. In the script src, I pass in the form I want my script to build (from a db table), and the div where the dynamically built form should go. The calling page looks something like this:
<div id="FormContainer"></div>
<script type="text/JavaScript" src="http:...
I'm trying to build a blog/messageboard that uses static HTML files to serve content. I know MovableType used to manage their blog engiene this way, but using Perl CGI scripts. How do I edit/append to HTML files preferebly using PHP? What other methods would people reccommend?
...
Howdy, I'm writing a batch script that will run on a Windows XP machine. This script needs to be able to reliably validate that a directory, passed as a command-line parameter, does in fact exist.
Assuming my script is named script.bat, it needs to support the following as legal command-line parameters:
C:\> script.bat C:
C:\> script.b...
I want a bash script to read all files recursively in a directory and remove some code (i.e a iframe virus) from it and save back the orignal file.
...
I would like to select a node and modify its attributes and child-nodes using an
xsl:script function. In addition, templates matching child-nodes of that node should
STILL perform their job (after script is done processing the node).
Can it be done using XSLT?
Can you please provide an example / skeleton for such a transformation?
...
On Linux, I can do:
$ FOO=BAR ./myscript
to call "myscript" with the environment variable FOO being set.
Is something similar possible in Powershell, i.e. without having to first set the variable, call the command, and then unset the variable again?
To be more clear about my use case - I don't want to use this as part of a script. R...
I would like to write a script that can recursively scan the DLLs in a directory and generate a report of all of their version numbers.
How can I detect the version number of a DLL using a script? VBScript solutions are preferred, unless there is a better way.
...
On windows, I can run my ruby script like this:
> ruby myscript.rb
but I want to set things up so that I can just do this instead?..
> myscript.rb
How do I do this? I know it's possible because I've recently moved from one PC that had this set up to a new PC that doesn't (yet).
...