Skip to content

Instantly share code, notes, and snippets.

View bugcy013's full-sized avatar
🪄
Focusing

Dhanasekaran Anbalagan bugcy013

🪄
Focusing
View GitHub Profile
sudo apt-get install --assume-yes python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install --assume-yes nodejs
sudo apt-get install --assume-yes git
cd /opt && sudo git clone git://github.com/etsy/statsd.git
# StatsD configuration
cat >> /tmp/localConfig.js << EOF
#!/bin/bash
# hubot
# chkconfig: 345 20 80
# description: hubot
# processname: hubot
# REFERENCE: http://werxltd.com/wp/2012/01/05/simple-init-d-script-template/
# This script assumes you have a user called "hubot" on your system and that hubot is installed in /opt/hubot
#!/bin/bash
# Created Fri Mar 22 2014
# This is an indirect fork of https://gist.github.com/SeonghoonKim/4378896
# Most of it was reworked from http://blog.basefarm.com/blog/how-to-install-logstash-with-kibana-interface-on-rhel/
# This script will download, install and start
# the following items on CentOS 6.5:
# OpenJDK 1.7.0
# cURL
# ElasticSearch 1.0.1
# Logstash server 1.4.0
#!/bin/bash
if [ $# -eq 0 ]
then
echo "kandan.sh [options] postgres|restart
postgres - Automatically install gitlab with postgres on ubuntu
elif [ $1 == 'postgres' ]; then
echo "Updating Operating System..."

Welcome!

For feedback or suggestions, please send a tweet (@dideler). Gist comments don't notify me. Pull requests aren't possible with gists (yet), so I don't recommend forking because then I can't easily get the change.

Starring this gist will give me an idea of how many people consider this list useful.


Contents

What is Diamond?

https://github.com/BrightcoveOS/Diamond

From their wiki:

Diamond is a python daemon that collects system metrics and publishes them to Graphite. It is capable of collecting cpu, memory, network, i/o, load and disk metrics. Additionally, it features an API for implementing custom collectors for gathering metrics from almost any source.

Deps

apt-get install build-essentials
apt-get install python-dev
We couldn’t find that file to show.
# From http://derblub.com/human-readable-and-by-size-sorted-disk-usage-in-bash
function duf {
du -sk "$@" | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done
}
#!/bin/bash
# mirror_test.sh
# benchmarks closest ubuntu mirrors and outputs them in speed order
# bash -c "$(curl -fsSL https://gist.githubusercontent.com/lox/9152137/raw/mirror_test.sh)"
MIRRORS=$(curl -s http://mirrors.ubuntu.com/mirrors.txt)
TESTFILE="dists/$(lsb_release -c -s)/main/binary-amd64/Packages.bz2"
TIMEOUT=3
SAMPLES=3
output {
# <SNIP> other outputs <SNIP>
#
# Ping me if anything is about to explode, or if any important massage pass by
#
xmpp {
tags => 'warn_me'
host => "ejabberd.example.io"
message => "time='%{timestamp}', host='%{source_host}', tags='%{tags}',path='%{source_path}', type='%{type}', field='%{fields}' message='%{message}',"