In order to avoid errors like:
exec /usr/local/openjdk-11/bin/java: exec format error
or
The Open Web Application Security Project (OWASP) "is an open community dedicated to enabling organizations to conceive, develop, acquire, operate, and maintain applications that can be trusted."
The community publishes books, articles, holds events and provides guidance in the furtherance of application security. In relation to this training, it also publishes the OWASP Top Ten project.
#!/bin/bash | |
currentFolder=$(pwd) | |
for folder in */; do | |
if [ "$folder" != "node_modules/" ]; then | |
echo "Updating folder ${folder}" | |
cd $folder | |
git fetch --all -p |
#!/bin/bash | |
currentFolder=$(pwd) | |
echo "#################################" | |
echo "# Compressing folders from ${currentFolder}" | |
echo "#################################" | |
for i in */; do tar -czvf "${i%/}.tar.gz" --exclude "node_modules" --exclude ".next" "$i"; done |
// This file should be placed at pages/_middleware.ts | |
import { NextRequest, NextResponse } from 'next/server' | |
import { verifyIsLogged } from 'services/session' | |
const BASE_URL = 'https://my-site.com' | |
const PRIVATE_ROUTES = ['my-profile'] | |
const LOGIN_URL = `${BASE_URL}/api/auth?redir=` | |
export async function middleware(req: NextRequest) { |
# build environment | |
FROM node:13.12.0-alpine as builder | |
WORKDIR /app | |
ENV PATH /app/node_modules/.bin:$PATH | |
COPY package.json ./ | |
COPY package-lock.json ./ | |
RUN npm ci --silent | |
RUN npm install [email protected] -g --silent | |
COPY . ./ | |
RUN npm run build |
Create a SSH file:
$ ssh-keygen -t ed25519 -C "[email protected]"
Move private
and public
key in the folder ~/.ssh
import variables from "path/variables.json"; | |
/** | |
* Return variables as "$prefix-color-brand-..." | |
* | |
* @param {String} name | |
* @returns {String} | |
*/ | |
function formatVariableName(name) { | |
const prefix = "$prefix"; |
const keys = {}; | |
const keyInputs = document.querySelectorAll(".config-var-key"); | |
const keyInputsValue = document.querySelectorAll(".config-var-value"); | |
[...keyInputs].map((item, key) => { | |
keys[item.value] = keyInputsValue[key].value; | |
}); |