Skip to content

Instantly share code, notes, and snippets.

View dbach's full-sized avatar

Dave Bacher dbach

View GitHub Profile
@dbach
dbach / explore.groovy
Created January 6, 2016 06:38 — forked from cg-soft/explore.groovy
Discover Groovy Properties and Methods
// These two functions prove invaluable to understand and explore
// the jenkins data model. Include in a system groovy script or in
// the script console, and discover where the data really sits.
// See also http://stackoverflow.com/questions/32876496/how-can-i-retrieve-the-build-parameters-from-a-queued-job
// Credit to http://stackoverflow.com/users/172599/dave-bacher
def showProps(inst, prefix="Properties:") {
println prefix
for (prop in inst.properties) {
@dbach
dbach / editscript.rb
Created July 10, 2012 19:01 — forked from ttscoff/editscript.rb
Fuzzy CLI file search through configured directories, ranked results displayed as menu
#!/usr/bin/env ruby
# encoding: utf-8
# == Synopsis
# Proof of concept using Fuzzy File Finder to locate a script to edit
# Searches a set of predefined locations for a fuzzy string
# e.g. "mwp" matches both "myweatherprogram" and "mowthelawnplease"
# ................on "(m)y(w)eather(p)rogram" and "(m)o(w)thelawn(p)lease"
#
# Results are ranked and a menu is displayed with the most likely
# match at the top. Editor to be launched and directories to search
@dbach
dbach / gist:725835
Created December 2, 2010 18:47
sample scons source
driver_sources = [ ... ]
# original
#d = [env.Object(src, src) for src in driver_sources]
#env.Library(d)
# my comments:
# env.Object(src, src) is weird because you're using the same name
# for source and target.
# I prefer just to let scons sort out the object names:
env.Library('libdriver', driver_sources)
#!/bin/sh
# Edit these values for your subversion repository
hudson_user=my_username
hudson_passwd=my_password
# Initialization -- Set up the svn repository before running this script
# cd $HUDSON_HOME
# svn mkdir --parents --username=my_username -m "Hudson configuration" REPOSITORY_URL
# svn co REPOSITORY_URL .