This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
:: Script to import and trust CACERTS entries into the JSSECACERTS file | |
:: run this file from a Java servers home directory with no arguments | |
:: J_HOME is the parent directory of the directory you run your server out of. | |
:: assumes J_HOME/Javasoft might be your JRE home | |
::------ | |
SETLOCAL EnableDelayedExpansion | |
SET fileobject=jars\myServer.jar | |
if defined J_HOME ( | |
GOTO JREHOMESET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
::------------------------------------------------------------------- | |
:: openfire_START.bat | |
:: The directory usually called "Openfire" is referred to as _SERVER_HOME | |
:: Script assumes these directories exist: | |
:: \Openfire , \Openfire\Javasoft, \Openfire\Databases, \Openfire\lib, \Openfire\plugins | |
::------------------------------------------------------------------- | |
setlocal | |
IF DEFINED SERVER_HOME ( | |
ECHO SERVER_HOME is already set to %SERVER_HOME% from system environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
SETLOCAL ENABLEDELAYEDEXPANSION | |
SET XMLFILE=plugins.xml | |
SET XMLBASE=//Config/Plugin | |
xmlstarlet.exe sel -t^ | |
-c ^"%XMLBASE%/Instance/Project[@name='myapp']/DEBUG^" --nl^ | |
-c ^"%XMLBASE%/Instance/Project[@name='myapp']/Company^" --nl^ | |
-c ^"%XMLBASE%/Instance/Project[@name='myapp']/SaveOffline^" --nl^ | |
-c ^"%XMLBASE%/Instance/Project[@name='myapp']/Client^" --nl^ | |
-c ^"%XMLBASE%/Instance/Project[@name='myapp']/GPSDiscoverPort^" --nl^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off &SETLOCAL ENABLEDELAYEDEXPANSION | |
:: Functions for updating property files | |
ECHO Args to script: %1 %2 %3 | |
::--------------------------------------------------- | |
:: Create test file if it doesn't exist | |
::--------------------------------------------------- | |
IF NOT EXIST test.properties ( | |
ECHO Key1=Value1>test.properties | |
ECHO #Key2=Value2>>test.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public WebElement waitFindElement(WebDriver drv, By by, long timeout, long interval) | |
{ | |
long start = System.currentTimeMillis(); | |
while(true){ | |
try{ | |
return drv.findElement(by); | |
} catch(NoSuchElementException nse) { | |
if(System.currentTimeMillis()-start>=timeout) | |
{ | |
throw new Error("Timeout reached and element["+by+"]not found"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
security = share | |
guest account = publicuser | |
passdb backend = tdbsam | |
[publicuser] | |
comment = publicuser Home Dir | |
path = /home/publicuser | |
public = yes | |
writable = yes | |
write list = +publicuser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unix_name = SMB_name1 SMB_name2 ... | |
# root = | |
publicuser = Administrator smbguest pcguest guest | |
# nobody = guest pcguest smbguest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
COLOR 4F | |
SET NAME=setenv.bat | |
TITLE Script %NAME% | |
ECHO %NAME% ... | |
::------------------------------------------------------------------- | |
:: Script configuration | |
::------------------------------------------------------------------- | |
::SETLOCAL ENABLEDELAYEDEXPANSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
SETLOCAL ENABLEDELAYEDEXPANSION | |
COLOR 6F | |
IF EXIST C:\Users ( | |
::IF "%USERNAME%" NEQ "%RunAsUser%" | |
ECHO Current User is '%USERNAME%' | |
ECHO You may need to run this script as 'Administrator' user. | |
::SET "RunAsUser=Administrator" | |
::RUNAS /user:%RunAsUser% "cmd.exe /c %~f0" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
:: Demonstration of getting running directory name | |
ECHO _CD=%CD% | |
SET _SCRIPT=%~dpnx0 | |
SET "_PARENT=%~dpnx0" & CALL SET "_PARENT=%%_PARENT:\%~nx0=%%" | |
FOR /F "delims=\" %%a IN ("%~dp0") DO SET _RUNDIR=%%~nxa | |
ECHO _SCRIPT=%_SCRIPT% | |
ECHO _PARENT=%_PARENT% | |
ECHO _RUNDIR=%_RUNDIR% |