Skip to content

Instantly share code, notes, and snippets.

obs = obslua
os = require("os")
io = require("io")
relative_path_from_home = "Dropbox/Twitch Assets"
settings_path = ""
function refresh_button_clicked(props, p)
update()
end
#!/usr/bin/env ruby
require 'socket'
LISTEN_PORT = 8514
DESTINATION_HOST = "xxxx.papertrailapp.com"
DESTINATION_PORT = xxxx
class SyslogRelay
PARSER = /^(<\d+>\S+\s+\S+\s+\S+) \("([^,]+),([^,]+),([^"]+)"\) ([^:]+): (.*)$/
@eric
eric / copy_librato_dashboard.rb
Last active July 15, 2016 22:11 — forked from jderrett/copy_librato_dashboard.rb
Copy Librato Dashboard from one account to another
require 'faraday'
require 'faraday_middleware'
require 'json'
class DashboardApi
LIBRATO_API = 'https://metrics-api.librato.com'
LIBRATO_API_VERSION = 'v1'
ENDPOINT = [LIBRATO_API, LIBRATO_API_VERSION].join('/')
attr_accessor :username
package main
import (
"testing"
"sync"
"sync/atomic"
)
func TestOneBarrier(t *testing.T) {
expected := int32(2)
Manifest-Version: 1.0
Implementation-Vendor: net.lag
Implementation-Title: kestrel
Implementation-Version: 2.4.1
Implementation-Vendor-Id: net.lag
Class-Path: libs/scala-library.jar libs/ostrich-8.2.9.jar libs/scala-j
son-3.0.1.jar libs/util-core-5.3.13.jar libs/util-eval-5.3.13.jar lib
s/scala-compiler.jar libs/util-logging-5.3.13.jar libs/util-jvm-5.3.1
3.jar libs/naggati_2.9.2-4.1.0.jar libs/finagle-core-5.3.19.jar libs/
netty-3.5.5.Final.jar libs/util-collection-5.3.13.jar libs/jsr305-1.3
{"$id":"1","Error":"This salt has already been used in the last 8 hour period"}
@eric
eric / papertrail.coffee
Last active January 1, 2016 18:49
Work in progress Papertrail hubot plugin
# Description:
# Query logs from Papertrail
#
# Dependencies:
# None
#
# Configuration:
# HUBOT_PAPERTRAIL_API_TOKEN - Papertrail API token
#
# Commands:
class Option
end
class None < Option
def map(&block)
return None
end
end
class Some < Option
@eric
eric / bluebox.coffee
Last active December 25, 2015 17:19
Pipe all messages from BlueBox customer chat into Campfire
# Description:
# Providing ways to interact with bluebox
#
# Commands:
# hubot bluebox chat on - Enable chat transcripts
# hubot bluebox chat off - Disable chat trascripts
#
# Dependencies:
# "cookie": "0.1.0"
# "cheerio": "0.12.3"
namespace :test do
task :turn_off_verbose do
ObjectSpace.each_object(Rake::TestTask) { |t| t.verbose = false }
end
end
%w(test:units test:functionals test:integration).each do |task_name|
Rake::Task[task_name].prerequisites << 'test:turn_off_verbose'
end