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
#!/opt/sensu/embedded/bin/ruby | |
require 'growthforecast' | |
# Create `Growthforecast` instance: | |
gf = GrowthForecast.new('localhost', 5125) | |
glist = gf.graphs() | |
glist.each do |graph| |
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
{ | |
"retry_join": [ "sensu.kazu634.lan" ], | |
"retry_interval": "30s", | |
"retry_max_attempts": 10, | |
"snapshot_path": "/home/kazu634/src/serf_snapshot.dat", | |
"rejoin_after_leave": true, | |
"leave_on_terminate": true, | |
"skip_leave_on_interrupt": true, |
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
#!/opt/sensu/embedded/bin/ruby | |
require 'growthforecast' | |
# abort unless one argument is given: | |
abort unless ARGV.length == 1 | |
str = ARGV[0] | |
# Create `Growthforecast` instance: |
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
# check whether `peco` exists | |
if which peco > /dev/null; then | |
function gim () { | |
# check whether the current directory is under `git` repository. | |
if git rev-parse 2> /dev/null; then | |
local selected_file=$(git ls-files . | peco) | |
if [ -n "${selected_file}" ]; then | |
vi ${selected_file} | |
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
#!/opt/sensu/embedded/bin/ruby | |
require 'rubygems' | |
require 'json' | |
require 'growthforecast' | |
# constants | |
COLORS = { | |
"cpu" => { | |
"user" => "#FFBB7F", |
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
<source> | |
type dstat | |
tag dstat | |
option -cmln | |
delay 3 | |
</source> | |
# GrowthForecast用にメッセージを加工する | |
<match dstat> | |
type copy |
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
#### | |
## Output descriptions: | |
## | |
# Treasure Data (http://www.treasure-data.com/) provides cloud based data | |
# analytics platform, which easily stores and processes data from td-agent. | |
# FREE plan is also provided. | |
# @see http://docs.fluentd.org/articles/http-to-td | |
# | |
# This section matches events whose tag is td.DATABASE.TABLE |
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/sh | |
z40=0000000000000000000000000000000000000000 | |
IFS=' ' | |
while read local_ref local_sha remote_ref remote_sha | |
do | |
if [ "$local_sha" = $z40 ] | |
then | |
# Handle delete |
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
# SERVERSPEC - Resource Types | http://serverspec.org/resource_types.html | |
#============================= | |
# command | |
#============================= | |
snippet desco | |
alias descom | |
abbr describe command('whoami') do ~ end | |
prev_word '^' | |
describe command('${1:whoami}') do | |
${0} |
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
site :opscode | |
cookbook 'apt' | |
cookbook 'build-essential' | |
cookbook 'iptables' | |
cookbook 'motd-tail' | |
cookbook 'openvpn' | |
cookbook 'chef-solo-search', git:"[email protected]:edelight/chef-solo-search.git" |