Skip to content

Instantly share code, notes, and snippets.

@wiz4host
wiz4host / setup-users.groovy
Created November 6, 2018 17:25 — forked from johnbuhay/setup-users.groovy
jenkins init.groovy.d script for configuring users
import jenkins.*
import hudson.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import hudson.plugins.sshslaves.*;
import hudson.model.*
import jenkins.model.*
import hudson.security.*
@johnbuhay
johnbuhay / setup-users.groovy
Created January 21, 2016 01:15
jenkins init.groovy.d script for configuring users
import jenkins.*
import hudson.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import hudson.plugins.sshslaves.*;
import hudson.model.*
import jenkins.model.*
import hudson.security.*
@bantic
bantic / bucket_sync_service.rb
Created November 15, 2012 19:47
ruby class to copy from one aws s3 bucket to another
require 'aws/s3' # gem name is 'aws-sdk'
class BucketSyncService
attr_reader :from_bucket, :to_bucket, :logger
attr_accessor :debug
DEFAULT_ACL = :public_read
# from_credentials and to_credentials are both hashes with these keys:
# * :aws_access_key_id
@ianmackinnon
ianmackinnon / match.c
Created August 8, 2012 12:01
C Regex multiple matches and groups example
# gcc -Wall -o match match.c && ./match
#
#include <stdio.h>
#include <string.h>
#include <regex.h>