Skip to content

Instantly share code, notes, and snippets.

@deluan
deluan / hudson
Created September 29, 2010 16:10
Init script for Hudson CI Server
#!/bin/bash
#
# Startup script for Hudson
#
# chkconfig: - 84 16
# description: Hudson CI server
# Source function library.
#. /etc/rc.d/init.d/functions
@deluan
deluan / grails
Created September 28, 2010 14:00
Script for selecting and calling the correct Grails version when you have more than one version installed
#!/bin/sh
# Author: Deluan (http://techbeats.deluan.com)
# Check if GRAILS_HOME is set
if [ -z "$GRAILS_HOME" -o ! -d "$GRAILS_HOME" ]; then
echo "Error: GRAILS_HOME not set"
exit 2
fi
# Extract the base path from GRAILS_HOME
/*
* Copyright 2010 Deluan Cotts (grails@deluan.com.br)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@deluan
deluan / HgInit.groovy
Created August 31, 2010 18:43
Grails script to create a new Mercurial Repository for the current project, and a default .hgignore
/*
* Copyright 2010 Deluan Cotts (grails@deluan.com.br)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@deluan
deluan / bb-trigger.sh
Created March 8, 2015 05:00
Use this script for services you don't want BB to alert in red on the first failure. It will become yellow first, and then, after a configurable number of polls, it will go red. Useful with network tests over a noisy link (except when you're responsible for the link ;). Tested only with Linux. http://goo.gl/WZFwNZ
#!/bin/sh
#
# $Id: bb-trigger.sh,v 1.2 2002/01/29 18:50:17 deluan Exp $
#
# by Deluan Cotts Quintao (bb@deluan.com.br)
#
# Use this script for services you don't want BB to alert in red on the first error.
# It will become yellow first, and then, after a configurable number of polls, it will
# go red. Useful with network tests over a noisy link (except when you're responsible
# for the link ;)
@deluan
deluan / simian-summary.rb
Last active August 29, 2015 14:09
This script processes the YML output of Simian (http://www.harukizaemon.com/simian/) and generates some useful summarized information
#!/usr/bin/env ruby
require 'yaml'
require 'pp'
if ARGV.count == 0
puts "Usage: simian-sum <simian-result.yml>"
puts
puts "Remember to remove the first 3 lines of the yml file"
exit