Skip to content

Instantly share code, notes, and snippets.

View jstangroome's full-sized avatar

Jason Stangroome jstangroome

View GitHub Profile
Plugin is finished {:plugin=><LogStash::Inputs::S3 bucket=>"bucket_name", credentials=>["access_key", "secret_key"], region_endpoint=>"us-east-1", type=>"elb-access", sincedb_path=>"/dev/null">, :level=>:info, :file=>"logstash/plugin.rb", :line=>"59"}
A plugin had an unrecoverable error. Will restart this plugin.
Plugin: <LogStash::Inputs::S3 bucket=>"bucket_name", credentials=>["access_name", "secret_key"], region_endpoint=>"us-east-1", type=>"elb-access", sincedb_path=>"/dev/null">
Error: no time information in ""
Exception: ArgumentError
Stack: file:/path/logstash-1.4.1/vendor/jar/jruby-complete-1.7.11.jar!/META-INF/jruby.home/lib/ruby/1.9/time.rb:267:in `parse'
/path/logstash-1.4.1/lib/logstash/inputs/s3.rb:261:in `sincedb_read'
/path/logstash-1.4.1/lib/logstash/inputs/s3.rb:147:in `process_new'
/path/logstash-1.4.1/lib/logstash/inputs/s3.rb:137:in `run'
org/jruby/RubyKernel.java:1521:in `loop'
@aaronpowell
aaronpowell / jq.js
Created August 14, 2014 23:40
jq - a simple cli for JSON querying
process.stdin.setEncoding('utf8');
var what = process.argv[2] || '';
process.stdin.on('readable', function () {
var chunk = process.stdin.read();
if (chunk) {
var obj = JSON.parse(chunk);
@mfournier
mfournier / varnish4.diff
Created October 21, 2014 14:43
initial patch adding varnish4 support to collectd
diff --git configure.ac configure.ac
index 9dd30c7..26c342a 100644
--- configure.ac
+++ configure.ac
@@ -4591,7 +4591,7 @@ if test "x$with_libvarnish" = "xyes"
then
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
- AC_CHECK_HEADERS(varnish/varnishapi.h, [], [with_libvarnish="no (varnish/varnishapi.h not found)"])
+ #AC_CHECK_HEADERS(varnish/varnishapi.h, [], [with_libvarnish="no (varnish/varnishapi.h not found)"])
@aaronpowell
aaronpowell / gist:4159243
Created November 28, 2012 05:37
Get changeset from workspace
var localPath = "Some Path";
if (!Workstation.Current.IsMapped(localPath)) {
Log.LogError(string.Format("The local path '{0}' is not mapped to a TFS workspace.", LocalPath));
return false;
}
var info = Workstation.Current.GetLocalWorkspaceInfo(localPath);
var collection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(info.ServerUri);
var workspace = info.GetWorkspace(collection);
var localVersions = workspace.GetLocalVersions(new [] {new ItemSpec(localPath, RecursionType.Full)}, false);
#requires -Version 2.0
param(
[Parameter(Mandatory=$true)]
[string]
$databaseRootDirectory
)
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
$fileGroupSpecification = "ON [PRIMARY]"
@relekang
relekang / wsgi.py
Created February 12, 2013 22:18
django wsgi.py with new relic intialize
# -*- coding: utf-8 -*-
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
import newrelic.agent
newrelic.agent.initialize(os.path.join(os.path.dirname(os.path.dirname(__file__), 'newrelic.ini')
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
@jssjr
jssjr / README.md
Created October 25, 2013 18:27
Graphite is great, but unfortunately the web UI itself isn't instrumented. (Yo dawg, I heard you like graphite.) Enable the directives to log render and cache performance, then monitor this with collect's tail plugin so you can visualize graphite performance.

render-performance

@hummer2k
hummer2k / magento2-varnish-4.0.vcl
Last active August 8, 2019 09:06
Magento 2 vcl for varnish 4
vcl 4.0;
import std;
# The minimal Varnish version is 4.0
backend default {
.host = "{{ host }}";
.port = "{{ port }}";
}
@jjmaestro
jjmaestro / whisper-calculator.py
Last active November 26, 2019 07:13
whisper-calculator.py: Calculates the size of the whisper storage for the given retention (in frequency:history format)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def archive_to_bytes(archive):
def to_seconds(s):
SECONDS_IN_A = {
's': 1,
'm': 1 * 60,
'h': 1 * 60 * 60,
date slug tags title author type
2014-08-19 17:04:34 GMT
Avoid-Command-Injection-Node.js
security, node.js, injection
Avoiding Command Injection in Node.js
Adam Baldwin
text