Skip to content

Instantly share code, notes, and snippets.

View billwestfall's full-sized avatar
🤔
thinkin'

Bill Westfall billwestfall

🤔
thinkin'
View GitHub Profile
@cdahlqvist
cdahlqvist / epoch_prefixed_md5_identifier.conf
Last active July 3, 2020 03:50
Logstash config showing how to create a document identifier built from MD5 hash prefixed by hex formatted epoch date
input {
generator {
lines => ['2011-04-19T03:44:01.103Z testlog1',
'2011-04-19T03:44:02.035Z testlog2',
'2011-04-19T03:44:03.654Z testlog3',
'2011-04-19T03:44:03.654Z testlog3']
count => 1
}
}
@jorgemorgado
jorgemorgado / LICENSE.md
Last active December 8, 2022 08:54
Sparkline chart widget for Dashing

The MIT License (MIT)

Copyright (c) 2015 Jorge Morgado

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@andrescolodrero
andrescolodrero / number_service-status.coffee
Last active November 7, 2016 21:31
Number Status Services
class Dashing.NumberStatusService extends Dashing.Widget
@accessor 'current', Dashing.AnimatedValue
@accessor 'difference', ->
if @get('last')
last = parseInt(@get('last'))
current = parseInt(@get('current'))
if last != 0
diff = Math.abs(Math.round((current - last) / last * 100))
"#{diff}%"
require 'nokogiri'
require 'watir-webdriver'
TW_HEALTH_TO_LIGHT = {
'Service is operating normally' => 'green',
'Performance issues' => 'yellow',
'Service disruption' => 'red'
}
@dopiaza
dopiaza / slackpost
Created September 5, 2013 12:33
Post a message to a Slack channel
#!/bin/bash
# Usage: slackpost <token> <channel> <message>
# Enter the name of your slack host here - the thing that appears in your URL:
# https://slackhost.slack.com/
slackhost=PUT_YOUR_HOST_HERE
token=$1
@biovisualize
biovisualize / index.html
Created June 9, 2011 14:42
Simple D3 tooltip
<!DOCTYPE html>
<html >
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
</head>
<body>
<div class="example_div"></div>
<script type="text/javascript">
var tooltip = d3.select("body")
.append("div")
@schacon
schacon / example_gist_create.rb
Created August 6, 2008 20:29
gist example api post
require 'net/http'
require 'uri'
# /api/v1/:format/new
# /api/v1/:format/gists/:user
# /api/v1/:format/:gist_id
res = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/xml/new'),
{ 'files[file1.ab]' => 'CONTNETS',
'files[file2.ab]' => 'contents' })