Skip to content

Instantly share code, notes, and snippets.

{
"checks": {
"seyren_check": {
"command": "/etc/sensu/plugins/check-procs.rb -p PROC",
"interval": 10,
"subscribers": ["SUB"],
"handlers": ["remediator","pagerduty"],
"occurrences": 1,
"refresh": 10,
"remediation": {
@harishbsrinivas
harishbsrinivas / rbenv-install-system-wide.sh
Created September 29, 2015 06:46 — forked from jnx/rbenv-install-system-wide.sh
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@harishbsrinivas
harishbsrinivas / securityGroupsInUse.sh
Last active September 15, 2015 06:14
This script uses ansible EC2 invetory script to list all security groups currently in use. This can be used to clean up unused SGs
#!/usr/bin/env bash
set -e
set -u
# This script expects that ansible, ansible EC2 invetory script are already installed and setup correctly.
# The EC2 invetory script should be named /etc/ansible/hosts.
if hash ansible 2>/dev/null; then
if [[ ! -f /etc/hosts/ansible ]]; then
@harishbsrinivas
harishbsrinivas / fetch_news.rb
Created January 4, 2013 05:17
A simple Ruby script to scrape PDF files from an Indian newspaper website. www.deccanheraldepaper.com allows download of individual pages of the news paper but there is no way to download all of them at once. The script downloads all the pages to my computer which can then be transferred to my tablet for reading offline during my commute.
# Copyright 2013 Harish B Srinivas
#
# 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
# distributed under the License is distributed on an "AS IS" BASIS,