Skip to content

Instantly share code, notes, and snippets.

View mhald's full-sized avatar

Martin Hald mhald

View GitHub Profile
---
replicated_api_version: "2.3.5"
name: "Elastic.Sample"
properties:
app_url: https://{{repl ConfigOption "hostname" }}
logo_url: https://bower.io/img/bower-logo.png
console_title: Elasticsearch Cluster
backup:
enabled: false
monitors:

Keybase proof

I hereby claim:

  • I am mhald on github.
  • I am mhald (https://keybase.io/mhald) on keybase.
  • I have a public key whose fingerprint is BECA 917F 7218 A86A 3081 7768 FDF9 7D87 AAAC C497

To claim this, I am signing this object:

@mhald
mhald / gist:1890290
Created February 23, 2012 04:47 — forked from bkimble/gist:1365005
List local memcached keys using Ruby
#!/usr/bin/env ruby
require 'net/telnet'
cache_dump_limit = 100
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 11211, "Timeout" => 3)
slab_ids = []
localhost.cmd("String" => "stats items", "Match" => /^END/) do |c|
matches = c.scan(/STAT items:(\d+):/)
slab_ids = matches.flatten.uniq
end
@mhald
mhald / logging.perl.setup
Created October 27, 2011 14:16
Logging Perl Modules
yum install cpan
cpan i File::Tail
cpan i Date::Parse
cpan i Time::Interval
cpan i Time::Piece
cpan i Redis
cpan i Cache::Memcached