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