- Run the commands on any of the kafka brokers (APIs in v0.10)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'thread' | |
Thread.abort_on_exception = true | |
module Enumerable | |
def peach n=nil, &block | |
pmap n, &block | |
self | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basics | |
module Chef | |
class Resource | |
attr_reader :name | |
def initialize name | |
@name = name | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repo = '%s-tools' % node['lsb']['codename'] | |
apt_repository 'scalyr-agent-2' do | |
uri 'http://10.100.0.xx/repo/snapshots' | |
arch 'amd64' | |
distribution repo | |
components [repo] | |
key 'http://10.100.0.xx/repo/bjn.gpg' | |
end | |
package 'scalyr-agent-2' do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# knife cheat | |
## Search Examples | |
knife search "name:ip*" | |
knife search "platform:ubuntu*" | |
knife search "platform:*" -a macaddress | |
knife search "platform:ubuntu*" -a uptime | |
knife search "platform:ubuntu*" -a virtualization.system | |
knife search "platform:ubuntu*" -a network.default_gateway |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ensure we're not running as root | |
if [ $EUID -eq 0 ] ; then | |
echo "Do not run as root!" 1>&2 | |
exit 1 | |
fi | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ensure we're not running as root | |
if [ $EUID -eq 0 ] ; then | |
echo "Do not run as root!" 1>&2 | |
exit 1 | |
fi | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package checks | |
import ( | |
"fmt" | |
"time" | |
"strings" | |
maps "github.com/ashwanthkumar/golang-utils/maps" | |
"github.com/gambol99/go-marathon" | |
) |
OlderNewer