This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Open3.popen3 cmd do |sin, sout, serr, wait_thr| | |
loop do | |
rs, _, _ = IO.select([sout,serr]) # no multi-assign in conditions | |
break if (sout.eof? and serr.eof?) or (sout.closed? and serr.closed?) | |
next if rs.empty? | |
rs.each do |readable_io| | |
log readable_io.gets # read a line from it | |
end | |
end | |
exit_status = wait_thr.value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target=diffSeries( | |
app.important.stuff, | |
averageSeries( | |
timeShift(app.important.stuff, "-7d"), | |
timeShift(app.important.stuff, "-14d"), | |
timeShift(app.important.stuff, "-21d") | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/puppet/config/client.yaml | |
--- | |
client: example.com | |
environment: vagrant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
sub vcl_recv { | |
if (req.request == "POST") { | |
return (pipe); | |
} | |
if (req.url ~ "^/(s/|favicon.ico|download/resources/|download/batch/|images/icons/)") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# Allows Hubot to search a Graphite server for saved graphs | |
# | |
# Dependencies: | |
# A HuBot robot brain of some kind. MongoDB/Redis/... | |
# | |
# Configuration | |
# HUBOT_HIPCHAT_TOKEN | |
# GRAPHITE_URL (e.g. https://graphite.example.com) | |
# GRAPHITE_AUTH (e.g. user:password for Basic Auth) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copyright (c) 2013, Evgeny Zislis | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, | |
are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright notice, | |
this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright notice, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example of a dependency graph described using Graphviz dot notation | |
// see the rendering of graphiviz here - http://imgur.com/a/kiUR2 | |
digraph G { | |
sales_missing_info | |
None[label="",shape=point] | |
open[label="Open"] | |
sales_missing_info[label="Missing Info.",color=darkgreen,fontcolor=darkgreen] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const fs = require('fs'); | |
function displayEC2Event(event, type) { | |
if (event.errorCode) { | |
// -- errors is when someone is using his fat thumbs | |
console.log('ERROR: ', event.errorCode, event.errorMessage); | |
} else { | |
let items = event.responseElements.instancesSet.items; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var zlib = require('zlib'); | |
var ts = [ 0 ]; | |
var DEBUG = false; // set to `true` to enable timestamps in results | |
// private IP of the ELK server in "Default VPC" | |
var endpointHost = '172.31.10.250'; | |
var endpointPort = 9200; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!^k:: | |
SetTitleMatchMode 2 | |
WinActivate, ahk_class Qt5QWindowIcon ; OBS | |
WinMove, A,, -6, 1080, 880, 366 | |
WinActivate, Recent Events - Google Chrome ; StreamLabs | |
WinMove, A,, 1930, 1078, 640, 400 | |
WinActivate, Twitch - Google Chrome ; Chat | |
WinMove, A,, 860, 1080, 1084, 367 | |
WinActivate, Poloniex - Bitcoin/Digital Asset Exchange - API - Google Chrome | |
WinMove, A,, 0, 0, 1280, 1080 |