Skip to content

Instantly share code, notes, and snippets.

import groovy.yaml.YamlSlurper
def slurper = new YamlSlurper()
def configuration = '''
version: 3.0
environment: "dev"
context:
path: "/test"
endpoints:
@browol
browol / pipeline.groovy
Created May 15, 2024 14:41 — forked from lvthillo/pipeline.groovy
Scripted Jenkins pipeline which uses Kubernetes plugin
podTemplate(label: 'mypod', containers: [
containerTemplate(name: 'git', image: 'alpine/git', ttyEnabled: true, command: 'cat'),
containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', command: 'cat', ttyEnabled: true),
containerTemplate(name: 'docker', image: 'docker', command: 'cat', ttyEnabled: true)
],
volumes: [
hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock'),
]
) {
node('mypod') {
@browol
browol / tcp_flags.txt
Created May 7, 2024 08:40 — forked from tuxfight3r/tcp_flags.txt
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)
@browol
browol / remove-local-branches.md
Last active August 16, 2023 05:07 — forked from davoam/git: remove local branches which do not exist on remote server
How to remove local Git branches that do not exist on the remote server?

How to remove local Git branches that do not exist on the remote server?

git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done
@browol
browol / _0__ssl_certbot_letsencrypt.md
Created August 15, 2021 10:15 — forked from maxivak/_0__ssl_certbot_letsencrypt.md
Let's encrypt SSL certificates using certbot in docker

Directories on host machine:

  • /data/certbot/letsencrypt

  • /data/certbot/www

  • Nginx server in docker container

docker run -d --name nginx \