Skip to content

Instantly share code, notes, and snippets.

#/usr/bin/env ruby
# Sends events to hipchat for wonderful chatty notifications
#
# This extension requires the hipchat gem
#
# The reason I wrote this instead of using the normal hipchat handler, is that with Flapjack
# all events are handled unless you do crazy filtering stuff. Also with a large number of events
# and checks the sensu server can get overloaded with forking stuff. So anyway, hipchat extension :)
#
@garlandkr
garlandkr / README.md
Last active August 29, 2015 14:18 — forked from masha256/README.md

Description

A Dashing widget to show Hipchat user presence on a dashboard.

Dependencies

Add the following to your dashing Gemfile

gem 'hipchat'
@garlandkr
garlandkr / README.md
Last active August 29, 2015 14:18 — forked from alekstorm/README.md

Installation

To install, place datadog.py in your callback plugins directory. If you don't yet have one, run:

mkdir -p plugins/callback

Then place the following in your ansible.cfg file:

[defaults]

callback_plugins = ./plugins/callback

@garlandkr
garlandkr / gist:5b007cf5b090b5d381c9
Created March 23, 2015 15:42
Assigning shards in ElasticSearch
# First get the unassigned shard indices
curl -XGET http://localhost:8080/_cat/shards --silent | grep UNASS | awk '{print$1,$2}' | awk '!a[$0]++' > indices.txt
# Now assign them to the proper node.
cat indices.txt | while read -r index shard; do
curl -XPOST 'localhost:8080/_cluster/reroute' -d "{
\"commands\" : [ {
\"allocate\" : {
\"index\" : \"$index\",
\"shard\" : \"$shard\",
{
"client":{
"name":"host01",
"address":"10.2.1.11",
"subscriptions":[
"all",
"env_qa",
"frontend",
"proxy",
"apache"
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@garlandkr
garlandkr / README.md
Last active August 29, 2015 14:14 — forked from alekstorm/README.md

Installation

To install, place datadog.py in your callback plugins directory. If you don't yet have one, run:

mkdir -p plugins/callback

Then place the following in your ansible.cfg file:

[defaults]

callback_plugins = ./plugins/callback

#!/bin/bash
# This file was placed here by Gitlab. It makes sure that your pushed commits
# will be processed properly.
while read oldrev newrev ref
do
# For every branch or tag that was pushed, create a Resque job in redis.
pwd=`pwd`
reponame=`basename "$pwd" | cut -d. -f1`
@garlandkr
garlandkr / Readme.md
Last active August 29, 2015 14:11 — forked from frvi/Readme.md

Description

Dashing widget to display a Jenkins build status and build progress

The widget is based on the meter-widget which is default in the Dashing installation

The widget can also see the progress of a "pre-build", i.e if you have a job triggering the actual build you want to define, you can configure this job in the jenkins_build.rb as a prebuild.

For more information, please see Coding Like a tosser

Download archiva from http://archiva.apache.org/download.cgi
extract it to /opt/archiva/
cd /opt/archiva/bin
./archiva start
thats it :)
access it http://server-ip:8080/archiva or