This file contains hidden or 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
docker run -v /home/akash/vscode/repository:/wow -it registry.gitlab.com/security-products/nodejs-scan:4 /bin/sh | |
#wow will be automatically created if does not exist | |
docker run -v /home/akash/vscode/repository:/wow:ro -it registry.gitlab.com/security-products/nodejs-scan:4 /bin/sh | |
#add ro for read only |
This file contains hidden or 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 " | |
--- | |
- nodejs-extensions: | |
- .js | |
template-extensions: | |
- .new | |
- .hbs | |
- '' |
This file contains hidden or 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
python3 -m venv venv | |
source venv/bin/activate | |
pip install njsscan | |
njsscan | |
// Deactivate | |
deactivate | |
This file contains hidden or 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
package com.oncor.ams.core.managers.excel; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.Map; |
This file contains hidden or 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
variable "awsprops" { | |
default = { | |
region = "us-east-1" | |
vpc = "vpc-511de02c" # change this to your vpc id | |
ami = "ami-051f7e7f6c2f40dc1" | |
itype = "t2.micro" | |
subnet = "subnet-e3f05dbc" # change this to your subnet id | |
publicip = true | |
keyname = "my-static-site-key-pair" #change this to your key name | |
secgroupname = "tf-my-ec2-sec-grp" |
This file contains hidden or 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
# !/bin/bash | |
sudo yum update -y | |
sudo yum install -y docker | |
sudo service docker start | |
sudo usermod -aG docker ec2-user | |
sudo chkconfig docker on | |
sudo yum install nginx -y | |
sudo systemctl start nginx | |
sudo systemctl enable nginx |
This file contains hidden or 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
try { | |
networkId = UUID.randomUUID().toString() | |
sh "docker network create ${networkId}" | |
inner.call(networkId) | |
} finally { | |
sh "docker network rm ${networkId}" | |
} | |
} | |
pipeline { |
This file contains hidden or 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
URL gridUrl = new URL("url"); | |
EdgeOptions edgeOptions = new EdgeOptions(); | |
edgeOptions.setPlatformName(String.valueOf(Platform.LINUX)); | |
edgeOptions.addArguments("no-sandbox"); | |
// EdgeDriver driver = new EdgeDriver(edgeOptions); | |
EdgeDriver driver = new EdgeDriver(); | |
// RemoteWebDriver driver = new RemoteWebDriver(gridUrl); | |
DevTools devTools = driver.getDevTools(); | |
devTools.createSession(); |
This file contains hidden or 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
def withDockerNetwork(Closure inner) { | |
try { | |
networkId = UUID.randomUUID().toString() | |
sh "docker network create ${networkId}" | |
inner.call(networkId) | |
} finally { | |
sh "docker network rm ${networkId}" | |
} | |
} |
This file contains hidden or 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
package runner; | |
import org.junit.runner.RunWith; | |
import cucumber.api.CucumberOptions; | |
import cucumber.api.junit.Cucumber; | |
@RunWith(Cucumber.class) | |
@CucumberOptions | |
( features="classpath:features", |