2パターン書いてみたのですが、どちらがよい(or どちらもだめ)でしょうか??
graphonly=1
を指定すると、グラフのヘッダが消えるように実装しました
https://github.com/studio3104/HRForecast/commit/8621c50c6efe6f47f85cd8f1d11675880c2b28a6
graphonly=1
# key の構成は変わってしまうけど td-agent.conf としてはこっちのほうがシンプル | |
<source> | |
type dstat | |
tag dstat.__HOSTNAME__ | |
option -lnc | |
delay 3 | |
</source> | |
<match dstat.**> |
2パターン書いてみたのですが、どちらがよい(or どちらもだめ)でしょうか??
graphonly=1
を指定すると、グラフのヘッダが消えるように実装しました
https://github.com/studio3104/HRForecast/commit/8621c50c6efe6f47f85cd8f1d11675880c2b28a6
graphonly=1
require 'sinatra/base' | |
class Main < Sinatra::Base | |
before do | |
# nanka | |
end | |
get '/' do | |
'index' | |
end |
class App < Sinatra::Base | |
configure do | |
use Rack::Session::Dalli, | |
cache: Dalli::Client.new( | |
"#{ENV['MEMCACHE_SERVER']}:#{ENV['MEMCACHE_PORT']}", | |
username: ENV['MEMCACHE_USERNAME'], | |
password: ENV['MEMCACHE_PASSWORD'] | |
) | |
end | |
end |
require 'sinatra/base' | |
require 'sinatra/namespace' | |
class App < Sinatra::Base | |
end |
params = { v1: '10', v2: '' } | |
rule1 = Focuslight::Validator.rule(:int) | |
rule2 = Focuslight::Validator.rule(:not_blank) | |
result = Focuslight::Validator.validate( | |
params, | |
v1: { rule: [ rule1, rule2 ] }, | |
v2: { rule: [ rule1, rule2 ] }, | |
) | |
ap result |
class Hoge: | |
def hage(self): | |
if not '_hage' in self.__dict__.keys(): | |
self._hage = 'hage' | |
return self._hage | |
hoge = Hoge() | |
print hoge.hage() |
#!/usr/bin/env ruby | |
def colorcodeaverage(*codes) | |
sum = [ 0, 0, 0 ] | |
codes.each do |code| | |
c = code.scan(/.{1,2}/) | |
sum = sum.map.with_index { |s,i| s + c[i].to_i(16) } | |
end | |
sum.map { |s| ( s / codes.size ).to_s(16).rjust(2,'0') }.join.upcase | |
end |
{ | |
"lock_time":0.00019899999999999999, | |
"explain1":{ | |
"key_len":null, | |
"Extra":"Using where; Using join buffer", | |
"ref":null, | |
"table":"b", | |
"rows":"10", | |
"key":null, | |
"select_type":"SIMPLE", |
'time' => bless( { | |
'local_rd_secs' => 1033, | |
'local_rd_days' => 734695, | |
'rd_nanosecs' => 0, | |
'locale' => bless( { | |
'default_time_format_length' => 'medium', | |
'native_territory' => 'United States', | |
'native_language' => 'English', | |
'native_complete_name' => 'English United States', | |
'en_language' => 'English', |