Simple Dashing job to send sensu client history checks to dashing widgets.
##Dependencies
##Usage
Put the sensu.rb file in your /jobs folder.
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| int main() | |
| { | |
| int val; | |
| char str[20]; | |
| strcpy(str, "0x00010"); |
| #!/usr/bin/env ruby | |
| Version = '0.1' | |
| abort("Usage: #{__FILE__} idVendor:idProduct") if ARGV.empty? | |
| require 'curses' | |
| require 'libusb' | |
| # Add your own idVendor, idProduct, and movement codes here! |
| https://help.ubuntu.com/community/IptablesHowTo | |
| Place the scripts in | |
| /etc/network/if-pre-up.d and /etc/network/if-post-down.d |
Simple Dashing job to send sensu client history checks to dashing widgets.
##Dependencies
##Usage
Put the sensu.rb file in your /jobs folder.
| require 'nokogiri' | |
| class MyDoc < Nokogiri::XML::SAX::Document | |
| attr_reader :result | |
| def initialize | |
| @result = "" | |
| end | |
| def xmldecl version, encoding, standalone |
| script = open(ARGV[0]).read | |
| require "benchmark" | |
| include Benchmark | |
| require 'rkelly' | |
| require 'parsejs' | |
| require 'violet' | |
| require 'content_urls' |
| def remote_url_exists?(url) | |
| begin | |
| url = URI.parse(url) | |
| Net::HTTP.start(url.host, url.port) do |http| | |
| return http.head(url.request_uri).code == "200" | |
| end | |
| rescue | |
| false | |
| end | |
| end |
| require 'ostruct' | |
| require 'yaml' | |
| ::Secrets = OpenStruct.new(YAML.load_file(File.expand_path('../secrets.yml', __FILE__))[Rails.env]) |