Skip to content

Instantly share code, notes, and snippets.

View gist:d6a0a38149d14ad34490
"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 /
Created Sep 29, 2015 — forked from jnx/
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:// /usr/local/rbenv
# Add rbenv to the path:
harishbsrinivas /
Last active Sep 15, 2015
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 / fetch_news.rb
Created Jan 4, 2013
A simple Ruby script to scrape PDF files from an Indian newspaper website. 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.
View fetch_news.rb
# 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
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,