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 / 20130416-todo.md
Created April 28, 2017 09:35 — forked from mrflip/20130416-todo.md
Elasticsearch Tuning Plan

Next Steps

  • Measure time spend on index, flush, refresh, merge, query, etc. (TD - done)
  • Take hot threads snapshots under read+write, read-only, write-only (TD - done)
  • Adjust refresh time to 10s (from 1s) and see how load changes (TD)
  • Measure time of a rolling restart doing disable_flush and disable_recovery (TD)
  • Specify routing on query -- make it choose same node for each shard each time (MD)
  • GC new generation size (TD)
  • Warmers
  • measure before/after of client query time with and without warmers (MD)
@rhoml
rhoml / mesos.conf
Created September 6, 2016 22:41 — forked from gtrummell/mesos.conf
Logstash configuration for Mesos
# Logstash Configuration for Mesos Masters and Slaves
input {
file {
path => "/var/log/mesos/mesos-master.[EIFW]*"
tags => [
"master"
]
}
file {
@rhoml
rhoml / ec2tags.rb
Created April 5, 2016 11:12 — forked from rafaelfelix/ec2tags.rb
Hack to get ec2 tags to facter. Depends on aws-cli (https://github.com/aws/aws-cli), jq (http://stedolan.github.io/jq/) and the JSON RubyGem (http://rubygems.org/gems/json)
require 'facter'
require 'json'
if Facter.value("ec2_instance_id") != nil
instance_id = Facter.value("ec2_instance_id")
region = Facter.value("ec2_placement_availability_zone")[0..-2]
tags = Facter::Util::Resolution.exec("aws ec2 describe-tags --filters \"name=resource-id,values=#{instance_id}\" --region #{region} | jq '[.Tags[] | {key: .Key, value: .Value}]'")
parsed_tags = JSON.parse(tags)
parsed_tags.each do |tag|
@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

@rhoml
rhoml / 0_reuse_code.js
Created June 2, 2014 14:02
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#
# This config file is a combination of ideas from:
# http://www.37signals.com/svn/posts/1073-nuts-bolts-haproxy
# http://www.igvita.com/2008/05/13/load-balancing-qos-with-haproxy/
# http://wiki.railsmachine.com/HAProxy
# http://elwoodicious.com/2008/07/15/nginx-haproxy-thin-fastcgi-php5-load-balanced-rails-with-php-support/
# http://upstream-berlin.com/2008/01/09/using-haproxy-with-multiple-backends-aka-content-switching/
# http://wiki.railsmachine.com/HAProxy
# http://gist.github.com/raw/25482/d39fb332edf977602c183194a1cf5e9a0b5264f9
#
192.168.2.1
192.168.2.2
Check out README.md to get started editing Clojure with Emacs.
@rhoml
rhoml / b00m.rb
Created June 28, 2013 19:26 — forked from jpr5/b00m.rb
require 'rubygems'
require 'mechanize'
account = {
:email => "jpr5@serv.io",
:password => "balls",
}
agent = Mechanize.new
site = agent.post("https://www.hipchat.com/sign_in", account).uri.host
# Documentation for HAProxy
# http://code.google.com/p/haproxy-docs/w/list
# http://haproxy.1wt.eu/download/1.2/doc/architecture.txt
# NOTES:
# open files limits need to be > 256000, use ulimit -n to set (on most POSIX systems)
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice