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 | |
# Check if a command line argument is provided | |
if [ -z "$1" ] | |
then | |
# If not, prompt the user to enter the target directory | |
echo "Please enter the target directory:" | |
read -r target_dir | |
else | |
# If an argument is provided, use it as the target directory |
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 | |
# Function to sign a file | |
sign_file() { | |
# Check if file name and private key are provided | |
if [ $# -ne 2 ] | |
then | |
echo "Usage: $0 sign <file_to_sign> <private_key>" | |
exit 1 | |
fi |
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
require 'faker' | |
require 'net/http' | |
phishing_site = 'creeeeooooob.azurewebsites.net' | |
100.times.map { | |
source = Net::HTTP.get(phishing_site, '/') | |
domain = /url\=https\:\/\/([a-z]+)\.com\//.match(source)[1] | |
100.times.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
pipeline: | |
build: | |
image: maven:3.3.9-jdk-8 | |
commands: mvn install -DskipNpm -DskipTests | |
test: | |
image: maven:3.3.9-jdk-8 | |
commands: mvn integration-test -DskipNpm | |
buildjs: | |
image: node:10.16.0-jessie | |
commands: |
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
{ | |
"name": "yourname", | |
"version": "0.0.0", | |
"license": "MIT", | |
"scripts": { | |
"ng": "ng", | |
"start": "ng serve", | |
"prod-build": "ng build --prod --source-map", | |
"cypress:run": "cypress run", | |
"cypress:staging": "cypress run --record --key yourrecordkey --env environment=staging", |
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
module.exports = (on, config) => { | |
// `on` is used to hook into various events Cypress emits | |
// `config` is the resolved Cypress config | |
if (config.env.environment === 'staging') { | |
config.defaultCommandTimeout = 30000; | |
config.chromeWebSecurity = false; | |
config.baseUrl = 'https://staging.yourserveraddress.com'; | |
} | |
return config; |
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
context('Actions', () => { | |
beforeEach(() => { | |
cy.visit('/login'); | |
}); | |
it('Bad sign in should fail', () => { | |
cy.get('#username') | |
.type('[email protected]'); | |
cy.get('#password') | |
.type('Bad pass'); |
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
# vim: ft=nginx ts=2 sw=2 | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
add_header X-Frame-Options "SAMEORIGIN"; | |
add_header X-XSS-Protection "1; mode=block"; | |
# Make site accessible from http://localhost/ |
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
#start with our base image (the foundation) - version 7.1.5 | |
FROM businesstools/nginx-php:1.8.0 | |
#install composer | |
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer | |
#set our application folder as an environment variable | |
ENV APP_HOME /var/www/html | |
ENV COMPOSER_ALLOW_SUPERUSER=1 |
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
FROM openjdk:8-jdk-alpine | |
RUN apk update \ | |
&& apk add --no-cache curl | |
HEALTHCHECK --interval=5s --timeout=5s --retries=12 \ | |
CMD curl --silent --fail localhost:8080/actuator/health || exit 1 | |
VOLUME /tmp | |
ADD target/yourapp-SNAPSHOT.jar app.jar | |
ENV SPRING_PROFILES_ACTIVE cloud-dev | |
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] |
NewerOlder