Skip to content

Instantly share code, notes, and snippets.

View thelicato's full-sized avatar

Angelo Delicato thelicato

View GitHub Profile
@thelicato
thelicato / gitlab_security_pipeline_demo.md
Last active September 7, 2024 17:12
GitLab Security Pipeline

GitLab Security Pipeline Demo

This READMEexplains the whole process, from start to finish, on how to setup a custom Security Pipeline using GitLab. The starting point is a an already vulnerable application, for this example https://github.com/appsecco/dvna will be used.

The repo is cloned and pushed as-is in a new GitLab Project (empty). The first thing to do is enable a runner for our pipeline, this can be done in the Settings -> CI/CD section of the project

Table of Contents

  1. Add default SAST
  2. Customize Stages
@thelicato
thelicato / pop_os_utm_setup.sh
Last active March 6, 2023 15:21
Install Pop!_OS on Ubuntu in UTM (Apple Silicon)
#!/usr/bin/env bash
# Install mesa drivers
sudo apt update -y && sudo apt install -y mesa-*=22.0.*
# Avoid updating mesa drivers
dpkg-query --showformat='${Package}\n' --show | grep mesa | while read -r line; do
sudo apt-mark hold $line
done
@thelicato
thelicato / remove_node_modules.md
Created March 18, 2022 16:48
Delete all node_modules recursively (Linux/OS X/Windows)

Linux/OS X

Print folders

This command will print out each folder and also show how much space the folder is occupying.

find . -name "node_modules" -type d -prune -print | xargs du -chs

Delete folders

find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;
const MyDiagram = () => {
// create diagrams schema
const [schema, setSchema] = useState(initialSchema);
const addNode = () => {
var new_node = {
//new node data
}
var new_schema = Object.assign({},schema)
new_schema.nodes.push(new_node)