I hereby claim:
- I am danielhopkins on github.
- I am danielhopkins (https://keybase.io/danielhopkins) on keybase.
- I have a public key whose fingerprint is 2E91 3537 6B3F 35C1 EEEF 8DF6 EC7E 8CD5 7534 6D81
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
vo_alert_type: "SERVICE" | |
entity_state: "CRITICAL" | |
entity_id: "HTTP" | |
vo_organization_id: "bogus123" | |
timet: "1410726048" | |
state_start_time: "1410726048" | |
servicegroupname: "revenue-svcs" | |
host_name: "vaal" | |
hostgroupname: "tos-servers" | |
vo_uuid: "c747abb5-fb47-416b-baf3-468b111ea324" |
require 'rubygems' | |
require 'sinatra' | |
# Enter your API key from the REST integration tab | |
$API_KEY = "API_KEY" | |
# Download the basic vo.rb from https://gist.github.com/danielhopkins/7569899 | |
$VO_RB = '~/bin/vo.rb' | |
post '/webhook' do | |
state = params['entity_state'].gsub('"', '') |
#!/bin/bash | |
for i in `seq 1 10`; do | |
echo "----------$i" | |
echo "Network" | |
~/src/cassie-class/cassandra/bin/nodetool -h 127.0.0.1 -p 7100 getendpoints network_keyspace test $i 2>/dev/null | |
echo "Simple" | |
~/src/cassie-class/cassandra/bin/nodetool -h 127.0.0.1 -p 7100 getendpoints simple_keyspace test $i 2>/dev/null | |
done |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'json' | |
require 'uri' | |
require 'net/http' | |
json = [ | |
{:foo => "bar"}, | |
{:foo => 'chicken'}, |
#!/usr/bin/env ruby | |
require 'uri' | |
require 'net/http' | |
require "net/https" | |
require 'optparse' | |
url_path = "integrations/generic/20131114/alert" | |
options = {} |
This link
class EchoActor extends Actor with ActorLogging { | |
val cluster = Cluster(context.system) | |
override def preStart() { cluster.subscribe(self, classOf[LeaderChanged]) } | |
override def postStop() { cluster.unsubscribe(self) } | |
def receive = { | |
case state: CurrentClusterState => log.info(s"State is $state") | |
case LeaderChanged(leader) => log.info(s"Leader is $leader") | |
case msg => { |
/* | |
The general idea is to handle timeouts as a message instead of using callbacks or worse yet, blocking | |
the actor (as I do below) | |
*/ | |
val system = ActorSystem() | |
val myactor = system.actorOf(Props[MyActor]) | |
val someotheractor = system.actorOf(Props[SomeotherActor]) | |
class MyActor extends Actor with ActorLogging { |
# from .git_functions | |
function git_helpers_clean_remote() { | |
remote=$1 | |
git ls-remote -h $remote | | |
git show-ref --heads --exclude-existing | | |
cut -f 2 | xargs git push --delete $remote | |
} | |
# from .gitconfig | |
[alias] |