Skip to content

Instantly share code, notes, and snippets.

View josefsalyer's full-sized avatar

Josef Salyer josefsalyer

  • 11:58 (UTC -04:00)
View GitHub Profile
version: '3'
services:
zookeeper:
image: zookeeper:3.4.9
hostname: zookeeper
ports:
- "2181:2181"
environment:
ZOO_MY_ID: 1
@oifland
oifland / Jenkinsfile
Last active July 15, 2024 06:36
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {
@dasgoll
dasgoll / gist:455522f09cb963872f64e23bb58804b2
Created January 28, 2017 15:42
Jenkins REST API example using crumb
Each Jenkins page has a REST API hyperlink at the bottom, this is because each page has its own endpoint.
http://localhost:8080/me
configure
Click 'Show API Token'
78e21f82a9e137614fef5b9593bcf827 = API Token
curl -s -u goll:78e21f82a9e137614fef5b9593bcf827 http://localhost:8080/crumbIssuer/api/json
@abtris
abtris / 02-Jenkinsfile
Last active July 17, 2019 04:34
Jenkinsfile - imperative style vs declarative style
pipeline {
agent any
environment {
PACKAGE="github.com/abtris/bee"
GOPATH="/Users/abtris/go"
GOROOT="/usr/local/opt/go/libexec"
}
stages {
stage('Preparation') {
steps {
@kaleksandrov
kaleksandrov / global-protect.sh
Last active May 15, 2025 23:41
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)
anonymous
anonymous / Maggie's favorite folder
Created April 8, 2016 21:39
Maggie's favorite folder
๐Ÿ˜ป๐Ÿ˜ป๐Ÿ˜ป๐Ÿ˜ป๐Ÿ˜ป๐Ÿ˜ป๐Ÿ˜ป๐Ÿ˜ป๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ’ค๐Ÿ’ค๐Ÿ’ค๐Ÿ’ค๐Ÿ’€๐Ÿ’€๐Ÿ’€๐Ÿ‘บ๐Ÿ‘บ๐Ÿ‘บ๐Ÿ‘บ๐Ÿ‘น๐Ÿ‘น๐Ÿ‘ฝ๐Ÿ’ฉ๐Ÿ˜น๐Ÿ˜น๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ˜ฟ๐Ÿ˜ฟ๐Ÿ˜ผ๐Ÿ˜…๐Ÿ˜ฅ๐Ÿ˜ฐ๐Ÿ˜ญ๐Ÿ˜‚๐Ÿ˜ข๐Ÿ˜๐Ÿ˜˜๐Ÿ˜ค๐Ÿ˜ค๐Ÿ˜ท๐Ÿ‘ฒ๐Ÿ‘ณ๐Ÿ‘ฎ๐Ÿ‘ท๐Ÿ’‚๐Ÿ‘ถ๐Ÿ‘ฆ๐Ÿ‘ง๐Ÿ˜ฒ๐Ÿ˜ต๐Ÿ˜ถ๐Ÿ˜‡๐Ÿ˜‘๐Ÿ˜ฏ๐Ÿ˜–๐Ÿ˜‹๐Ÿ˜†๐Ÿ˜ก๐Ÿ˜ ๐Ÿ‘ฝ๐Ÿ’€๐Ÿ’ฆ๐Ÿ’ง๐Ÿ’›๐Ÿ’™๐Ÿ’œ๐Ÿ’šโค๏ธ๐Ÿ’”๐Ÿ’—๐Ÿ’“๐Ÿ’•๐Ÿ’–๐Ÿ’ž๐Ÿ’˜๐Ÿ’‹๐Ÿ’Œ๐Ÿ’๐Ÿ’Ž๐Ÿ’Ž๐Ÿ’Ž๐Ÿ’Ž๐Ÿ’Ž๐Ÿ’Ž๐Ÿ’Ž๐Ÿ’Ž๐Ÿ’Ž๐Ÿ‘ค๐Ÿ‘ฅ๐ŸŽ…๐ŸŽ„๐ŸŽ๐ŸŽ‹๐ŸŽ‰๐ŸŽŠ๐ŸŽˆ๐ŸŽŒ๐Ÿ”ฎ๐ŸŽฅ๐Ÿ’ฟ๐Ÿ“€๐Ÿ’ฝ๐Ÿ“ผ๐Ÿ“น๐Ÿ”‹๐Ÿšฟ๐Ÿ””๐Ÿ”•๐Ÿ”‰๐Ÿ”Š๐Ÿ”ˆ๐Ÿ”‡๐Ÿ”†๐Ÿ”…๐Ÿ“ข๐Ÿ“ฃ๐Ÿ“กโณโŒ›๏ธโฐโŒš๏ธ๐Ÿ”“๐Ÿ”’๐Ÿ”๐Ÿ”๐Ÿ’ฃ๐Ÿ’ธ๐Ÿ”ซ๐Ÿ”ช๐Ÿ’Š๐Ÿ’‰๐Ÿšฌ๐Ÿšช๐Ÿ”จ๐Ÿ”ฉ๐Ÿ”ง๐Ÿšฝ๐Ÿ’ด๐Ÿ’ด๐Ÿ’ต๐Ÿ’ต๐Ÿ’ต๐Ÿ’ท๐Ÿ’ท๐Ÿ’ท๐Ÿ’ถ๐Ÿ’ถ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ”ช๐Ÿ”ช๐Ÿ”ช๐Ÿ”ช๐Ÿ”ช๐Ÿšฝ๐Ÿšฝ๐Ÿšฝ๐Ÿšฝ๐Ÿšฝ๐Ÿšฝ๐Ÿ’’๐Ÿจ๐Ÿฉ๐Ÿฅ๐Ÿš๐Ÿšฆ๐Ÿšฅ๐Ÿ‡ท๐Ÿ‡บ๐Ÿ‡ฌ๐Ÿ‡ง๐Ÿˆฏ๏ธ๐Ÿˆณ๐Ÿˆต๐Ÿˆด๐Ÿˆฒ๐Ÿ‰๐Ÿˆน๐Ÿˆบ๐Ÿˆน๐Ÿˆถ๐Ÿˆš๏ธ๐Ÿ†—๐Ÿ†™๐Ÿ†•๐Ÿ†’๐Ÿ†“๐Ÿ†–๐Ÿ“ถ๐ŸŽฆ๐Ÿ“ถ๐Ÿˆ๐Ÿšซ๐Ÿ”ž๐Ÿ“ต๐Ÿšฏ๐Ÿšฑ๐Ÿšณ๐ŸšทใŠ™๏ธ๐Ÿ‰‘ใŠ—๏ธ๐Ÿˆท๐Ÿˆธ๐Ÿˆ‚โ™‰๏ธโ™Š๏ธโ™‹๏ธโ™Œ๏ธโ™๏ธโ™Ž๏ธโ™๏ธโ™๏ธโ™‘๏ธโ™’๏ธโ™“๏ธโ›Ž๐Ÿ”ฏ๐Ÿ’ฒ๐Ÿ’ฒ๐Ÿ’ฑยฉยฎโ„ขยฉยฎโ„ขโŒโ€ผ๏ธโ‰๏ธโ—๏ธโ“โ•โ”โญ•๏ธ๐Ÿ”๐Ÿ”š๐Ÿ”™๐Ÿ”›๐Ÿ”œ๐Ÿ”ƒ๐Ÿ•›๐Ÿ•ง๐Ÿ•๐Ÿ•œ๐Ÿ•‘๐Ÿ•๐Ÿ•’๐Ÿ•ž๐Ÿ•“๐Ÿ•Ÿ๐Ÿ•”๐Ÿ• ๐Ÿ••๐Ÿ•–๐Ÿ•—๐Ÿ•˜๐Ÿ•™๐Ÿ•š๐Ÿ’ฎโ™ ๏ธโ™ฅ๏ธโ™ฃ๏ธโ™ฆ๏ธ๐Ÿ•ก๐Ÿ•ข๐Ÿ•ฃ๐Ÿ•ค๐Ÿ•ฅ๐Ÿ•ฆโœ–๏ธโž•โž–โž—โœ”๏ธโ˜‘๏ธ๐Ÿ’ฏ๐Ÿ”˜๐Ÿ”—๐Ÿ’ฎ๐Ÿ”—โžฐใ€ฐใ€ฝ๏ธ๐Ÿ”ฑโ—ผ๏ธโ—ป๏ธโ—พ๏ธโ—ฝ๏ธโ–ช๏ธโ–ซ๏ธ๐Ÿ”บ๐Ÿ”ฒ๐Ÿ”ณโšซ๏ธโšช๏ธ๐Ÿ”ด๐Ÿ”ต๐Ÿ”ปโฌœ๏ธโฌ›๏ธ๐Ÿ”ถ๐Ÿ”ท๐Ÿ”ธ๐Ÿ”น
@chinshr
chinshr / Jenkinsfile
Last active February 9, 2025 02:39
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}
@micw
micw / install_jenkins_plugin.sh
Last active August 11, 2023 06:14
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins
@adunning
adunning / gist:c670ab28c16f031f4777
Last active January 7, 2020 16:06 — forked from schmurfy/gist:3199254
Install pandoc on Mac OS X 10.9
#!/bin/bash
# First install BasicTeX: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg
# Allows you to run tlmgr without sudo.
$ sudo chown -R `whoami` /usr/local/texlive
# Update everything.
$ tlmgr update --self --all
# Install extra packages used by the default pandoc template.
@ogrrd
ogrrd / dnsmasq OS X.md
Last active May 9, 2025 23:25
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install