Skip to content

Instantly share code, notes, and snippets.

@kyzh
kyzh / 0.4.1.out
Last active February 25, 2016 19:45
debugging RancherOS : Ctrl + C signal not working in v0.4.2 #687
dockerdaemon--log-optmax-size=25m--log-optmax-file=2-soverlay-bdocker-sys--fixed-cidr172.18.42.1/16--restart=false-g/var/lib/system-docker-Groot-Hunix:///var/run/system-docker.sock--userland-proxy=false:
CAUGHT:
CAUGHT: SIGSYS
CAUGHT: SIGPWR
CAUGHT: SIGPOLL
CAUGHT: SIGIO
CAUGHT: SIGPROF
CAUGHT: SIGVTALRM
CAUGHT: SIGXFSZ
CAUGHT: SIGURG
@kyzh
kyzh / workshop.md
Last active August 29, 2015 14:14 — forked from beddari/workshop.md

#cfgmgmtcamp #packaginglove workshop

What will you need?

  • A laptop with Vagrant installed
  • Willingness to ask questions and help others!

What will we do?

@kyzh
kyzh / specs.out
Created December 13, 2013 16:29
huginn - rspec failure
/usr/local/rvm/rubies/ruby-1.9.3-p484/bin/ruby -S rspec ./spec/controllers/agents_controller_spec.rb ./spec/controllers/events_controller_spec.rb ./spec/controllers/logs_controller_spec.rb ./spec/controllers/user_location_updates_controller_spec.rb ./spec/controllers/webhooks_controller_spec.rb ./spec/lib/inheritance_tracking_spec.rb ./spec/lib/utils_spec.rb ./spec/models/agent_log_spec.rb ./spec/models/agent_spec.rb ./spec/models/agents/adioso_agent_spec.rb ./spec/models/agents/digest_email_agent_spec.rb ./spec/models/agents/event_formatting_agent_spec.rb ./spec/models/agents/human_task_agent_spec.rb ./spec/models/agents/peak_detector_agent_spec.rb ./spec/models/agents/post_agent_spec.rb ./spec/models/agents/sentiment_agent_spec.rb ./spec/models/agents/translation_agent_spec.rb ./spec/models/agents/trigger_agent_spec.rb ./spec/models/agents/twilio_agent_spec.rb ./spec/models/agents/twitter_publish_agent_spec.rb ./spec/models/agents/twitter_stream_agent_spec.rb ./spec/models/agents/twitter_user_agent_spec.rb
@kyzh
kyzh / enterprise_user_story-Redmine
Created November 15, 2013 11:56
User story: Enterprise user installing Redmine
Enterprise user story: Redmine
==============================
I want to install redmine.
I have an "enterprise" distribution.
I don't have access to the internet from my machines.
I have a private package repository that is a copy from the enterprise distribution.
Documentation:
--------------
@kyzh
kyzh / sinatra_app.rb
Created May 3, 2013 08:56
Updated call to the erb template
if !query_params[:print]
erb :dashboard, :locals => {:@graphite_url_displayed => params[:graphite_url_displayed]}
else
erb :print_dashboard, :layout => false
end
end
@kyzh
kyzh / dashboard.erb
Created May 3, 2013 07:49
modified dasboard view
<div class="row-fluid">
<div class="span2">
</div>
<div class="span6">
<h1><%= @dashboard.name %>&nbsp;<small><%= @dashboard.description %></small></h1>
</div>
<div class="span4">
<% if @graphite_url_displayed%>
<small>Source: <a class="muted" href="<%=@dashboard.graphite_render.sub("/render","")%>"><%=@dashboard.graphite_render.sub("/render","")%></a></small>
<% end %>
class SinatraApp < ::Sinatra::Base
def initialize(graphite_base, graph_templates, options = {})
# where the whisper data is
@whisper_dir = options.delete(:whisper_dir) || "/var/lib/carbon/whisper"
# where graphite lives
@graphite_base = graphite_base
# where the graphite renderer is
@graphite_render = [@graphite_base, "/render/"].join
@kyzh
kyzh / gdash.yaml
Last active December 16, 2015 22:29
Updated gdash.yaml
:graphite: http://graphite.example.net
:templatedir: /path/to/my/graph/templates
#:username: admin
#:password: secret
:options:
:title: My Dashboard
:prefix: ""
:refresh_rate: 60
:graph_columns: 2
:graph_width: 500

logstash queries graphed with graphite.

Operation: Decouple whisper from graphite.

Method: Create a graphite function that does a date histogram facet query against elasticsearch for a given query string for the time period viewed in the current graph.

Reason: graphite has some awesome math functions. Wouldn't it be cool if we could use those on logstash results?

The screenshot below is using logstash to watch the twitter stream of keywords "iphone" "apple" and "samsung" - then I graph them each, so we get an idea of popularity. As a bonus, I also do a movingAverage() on the iphone curve to show you why this is awesome.

@kyzh
kyzh / gist:5452491
Created April 24, 2013 14:22
anthracite git clone with edited submodule (swapped git for https)
[flo@WKS tmp]$ cd anthracite/
[flo@WKS anthracite]$ find . -name .gitmodules
./assets/bootstrap-datetimepicker/.gitmodules
./.gitmodules
[flo@WKS anthracite]$ cat .gitmodules
[submodule "assets/timeserieswidget"]
path = assets/timeserieswidget
url = https://github.com/Dieterbe/timeserieswidget.git
[flo@WKS anthracite]$ find . -name .gitmodules|xargs cat
[submodule "bootstrap"]