Skip to content

Instantly share code, notes, and snippets.

@venth
venth / 00-set-authorization.groovy
Created July 2, 2016 15:49 — forked from xbeta/00-set-authorization.groovy
put them in $JENKINS_HOME/init.groovy.d/
import jenkins.model.*;
import hudson.security.*;
// JVM did not like 'hypen' in the class name, it will crap out saying it is
// illegal class name.
class BuildPermission {
static buildNewAccessList(userOrGroup, permissions) {
def newPermissionsMap = [:]
permissions.each {
newPermissionsMap.put(Permission.fromId(it), userOrGroup)
@venth
venth / Dockerfile
Created August 13, 2017 19:20
Issue reproduction attempt: Version 0.3.9 returns no roles
FROM debian:stretch
RUN apt-get update && \
apt-get install -y curl python && \
curl -L https://bootstrap.pypa.io/get-pip.py | python && \
pip install aws-adfs
@venth
venth / prometheus.yml
Created February 4, 2019 18:13 — forked from sacreman/prometheus.yml
Prometheus configuration to scrape Kubernetes outside the cluster
# Prometheus configuration to scrape Kubernetes outside the cluster
# Change master_ip and api_password to match your master server address and admin password
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
# metrics for the prometheus server
- job_name: 'prometheus'
@venth
venth / ramdisk
Last active October 29, 2020 09:19
bash scripts that creates ramdisk on osx system and use ramdisk to deal with maven target directories; based on: https://stackoverflow.com/questions/46224103/create-apfs-ram-disk-on-macos-high-sierra
#!/usr/bin/env bash
delete=false
while [ $# -gt 0 ]; do
case "$1" in
-s*|--size*|--size=*)
size="${1#*=}"
size=$(($size*2048))
;;
-d|--delete)