Skip to content

Instantly share code, notes, and snippets.

View alpha01's full-sized avatar

Tony Baltazar alpha01

View GitHub Profile
#!/usr/bin/env ruby
# The name of the collectd plugin, something like apache, memory, mysql, interface, ...
PLUGIN_NAME = 'mycpuload'
hostname = ENV['COLLECTD_HOSTNAME'] || "localhost"
interval = ENV['COLLECTD_INTERVAL'] || 20
def usage
puts("#{$0} -h <host_id> [-i <sampling_interval>]")
exit
[tony@centos6 tmp]$ sha256sum spec/*
9283d5830dd58d2b8d80506edea042337d136289f446256cd849767e8f0f9cc5 spec/geojsonHelpers.js
ff5fd6eb02b63688ba5b5cf837f3d7628979bd15cae4c7dd3911cd362148e0c6 spec/spatialReferenceSpec.js
e5c046e31fd7d99a7a49d8f929777f9bfee2fc905c68c7f25033252c2e9eb3b6 spec/terraformerSpec.js
[tony@centos6 tmp]$ zip -r spec.zip spec
adding: spec/ (stored 0%)
adding: spec/spatialReferenceSpec.js (deflated 88%)
adding: spec/terraformerSpec.js (deflated 87%)
adding: spec/geojsonHelpers.js (deflated 77%)
[tony@centos6 tmp]$ sha256sum spec.zip
INFO global: Vagrant version: 1.8.7
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/gems/vagrant-1.8.7/bin/vagrant"
INFO global: VAGRANT_OLD_ENV_rvm_path="/Users/tony/.rvm"
INFO global: VAGRANT_OLD_ENV_LOGNAME="tony"
INFO global: VAGRANT_OLD_ENV_DISPLAY="/private/tmp/com.apple.launchd.cgLovAn7fH/org.macosforge.xquartz:0"
INFO global: VAGRANT_OLD_ENV_TERM_PROGRAM_VERSION="3.0.12"
INFO global: VAGRANT_OLD_ENV__system_type="Darwin"
INFO global: VAGRANT_OLD_ENV_LANG="en_US.UTF-8"
@alpha01
alpha01 / vagrant-notify plugin command
Created April 27, 2016 06:54
Available commands for vagrant-notify.
tony@alpha02:~/vagrant_testing$ vagrant notify --help
Usage: vagrant notify
-h, --help Display this screen.
--status Show vagrant-notify-server daemon status. (default)
--start Manually start vagrant-notify-server daemon.
--stop Manually stop vagrant-notify-server daemon.
--restart Manually restart vagrant-notify-server daemon.
@alpha01
alpha01 / fruits.pl
Last active December 19, 2015 17:48
fruits-and-veggies Perl cousin :-)
use List::Util q(max);
use strict;
print " = List of vegetables and fruits = \n\n";
my @vegetables = ("spinach", "peas", "broccoli", "celery", "lettuce");
my @fruits = ("grape", "kiwi", "lime", "mango", "apple", "peach");
my (@fruit_output_column, @vegie_ouput_column);
@alpha01
alpha01 / node_with_high_load
Created September 28, 2012 18:37
Node logger-rdc-3, output of when Elasticsearch was experiencing an extrememly high cpu load.
{
"ok" : true,
"_shards" : {
"total" : 10,
"successful" : 9,
"failed" : 1,
"failures" : [ {
"index" : "graylog2",
"shard" : 2,
"reason" : "BroadcastShardOperationFailedException[[graylog2][2] ]; nested: IndexShardMissingException[[graylog2][2] missing]; "
@alpha01
alpha01 / node_with_normal_load
Created September 28, 2012 18:34
Node logger-rdc-2 that is part of the cluster. Output of when a different node called logger-rdc-3, was having extremely high cpu load
{
"ok" : true,
"_shards" : {
"total" : 10,
"successful" : 9,
"failed" : 1,
"failures" : [ {
"index" : "graylog2",
"shard" : 2,
"reason" : "BroadcastShardOperationFailedException[[graylog2][2] ]; nested: RemoteTransportException[[logger-rdc-3][inet[/192.168.4.13:9300]][indices/status/s]]; nested: IndexShardMissingException[[graylog2][2] missing]; "