Skip to content

Instantly share code, notes, and snippets.

View mlbright's full-sized avatar

Martin-Louis Bright mlbright

  • Toronto
  • 08:25 (UTC -04:00)
View GitHub Profile
// This script is for Jenkins' Groovy console, and sets a timeout
// strategy for any job which doesn't have one.
// Based on http://janmaterne.wordpress.com/2010/07/11/how-to-check-if-all-hudson-jobs-have-a-timeout/
// Updated and modified by Sean Flanigan.
String describe(strat) {
if (strat instanceof hudson.plugins.build_timeout.impl.ElasticTimeOutStrategy) {
return "Elastic(${strat.timeoutPercentage}, ${strat.numberOfBuilds}, ${strat.timeoutMinutesElasticDefault})"
} else if (strat instanceof hudson.plugins.build_timeout.impl.AbsoluteTimeOutStrategy) {
return strat.timeoutMinutes
@mlbright
mlbright / echo.c
Created November 1, 2009 03:28 — forked from paulsmith/echo.c
/**
* A simple preforking echo server in C.
*
* Building:
*
* $ gcc -Wall -o echo echo.c
*
* Usage:
*
* $ ./echo