Skip to content

Instantly share code, notes, and snippets.

View rhoml's full-sized avatar
WFH

Rhommel Lamas rhoml

WFH
View GitHub Profile
@rhoml
rhoml / clients.md
Last active August 29, 2015 14:21 — forked from defunkt/clients.md

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@jhbabon
jhbabon / Gemfile
Last active December 19, 2015 04:08 — forked from rhoml/clear_hipchat.rb
# A sample Gemfile
source "https://rubygems.org"
gem 'mechanize'
gem 'chronic'
Check out README.md to get started editing Clojure with Emacs.
@sawanoboly
sawanoboly / SAMPLE.ht_ngx_access
Last active December 23, 2015 21:29
For Opscode chef. Enjoy ngx_mruby!
192.168.2.1
192.168.2.2
#!/usr/bin/env ruby
# based on the clear_hipchat.rb from https://gist.github.com/jhbabon/5894578
# usage = GMAIL_USER='user@company' GMAIL_PASS='secret' ./sweep_the_inbox.rb
require 'net/imap'
username = ENV['GMAIL_USER']
@gane5h
gane5h / datadog-nginx
Created October 22, 2014 04:06
Nginx log parsing with datadog
"""
Custom parser for nginx log suitable for use by Datadog 'dogstreams'.
To use, add to datadog.conf as follows:
dogstreams: [path to ngnix log (e.g: "/var/log/nginx/access.log"]:[path to this python script (e.g "/usr/share/datadog/agent/dogstream/nginx.py")]:[name of parsing method of this file ("parse")]
so, an example line would be:
dogstreams: /var/log/nginx/access.log:/usr/share/datadog/agent/dogstream/nginx.py:parse
Log of nginx should be defined like that:
log_format time_log '$time_local "$request" S=$status $bytes_sent T=$request_time R=$http_x_forwarded_for';
when starting dd-agent, you can find the collector.log and check if the dogstream initialized successfully
"""
@deverton
deverton / logstash-template.json
Created June 22, 2012 04:49
Logstash Elasticsearch Template
{
"template": "logstash-*",
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0,
"index" : {
"query" : { "default_field" : "@message" },
"store" : { "compress" : { "stored" : true, "tv": true } }
}
},
@gtrummell
gtrummell / mesos.conf
Last active June 27, 2020 11:41
Logstash configuration for Mesos
# Logstash Configuration for Mesos Masters and Slaves
input {
file {
path => "/var/log/mesos/mesos-master.[EIFW]*"
tags => [
"master"
]
}
file {
@mleinart
mleinart / whisper-path-migrate.sh
Created April 25, 2012 08:15
Script to migrate Graphite Whisper data from one dir to another
#!/bin/bash
## Adjustments
PATH=/bin:/usr/bin:/sbin:/usr/sbin
CARBON_SCRIPT=/etc/init.d/carbon-cache
CARBON_CONF=/etc/carbon/carbon.conf
RSYNC_OPTIONS='-av --ignore-existing'
WHISPER_BIN=/usr/bin
execute_cutover () {
@tobert
tobert / 0000README.md
Last active January 31, 2022 15:22
G1GC / CMS

G1GC v.s. CMS for Cassandra 2.0

Many people have asked me about using the G1 garbage collector with Cassandra. Since most of my customers are running 2.0 in production the test is with 2.0 for now. Once I script it up I'll re-run the numbers with 2.1.

I also need to re-test with Java 7 and the Oracle JDKs.

TL;DR