Skip to content

Instantly share code, notes, and snippets.

@jordansissel
jordansissel / 00-Sample run.txt
Last active August 4, 2016 18:09 — forked from reyjrar/logstash-config-broken.conf - Starting Point
Massive Parse Tree Failure in Logstash 5.0.0-alpha3
# Example packet:
% echo -n '<123>Aug 4 07:54:35 foo bar: { "hello": "world" }' | nc -vu 127.0.0.1 9514
% bin/logstash --version
logstash 5.0.0-alpha4
% bin/logstash -f logstash-config-broken.conf
Pipeline main started
{
PS C:\Users\jls.FRIENDSHIP> get-vm | where notes -eq origin
Name State CPUUsage(%) MemoryAssigned(M) Uptime Status Version
---- ----- ----------- ----------------- ------ ------ -------
CentOS 6.7 Off 0 0 00:00:00 Operating normally 7.0
CentOS 7 Off 0 0 00:00:00 Operating normally 7.0
Debian 8.4 Off 0 0 00:00:00 Operating normally 7.0
Fedora 23 Off 0 0 00:00:00 Operating normally 7.0
FreeBSD 10.3 Off 0 0 00:00:00 Operating normally 7.0
openSUSE 42.1 Off 0 0 00:00:00 Operating normally 7.0
#!/usr/bin/env ruby
#
require "cabin"
require "benchmark"
c = Cabin::Channel.get
iterations = 100_000
msg = "ok"
route /^slowcmd/, :slowcmd, :command => true
# ...
def slowcmd(msg)
Thread.new do
sleep 2
msg.reply("OK")
end
end
use rustc_serialize::json::{Json,Decoder};
use rustc_serialize::Decodable;
use std::io::Read;
pub fn parse<T: Read, R: Decodable, E>(mut r: T) -> Result<R, E> {
let item = try!(Json::from_reader(&mut r));
let mut decoder = Decoder::new(item);
let result: R = try!(Decodable::decode(&mut decoder));
Ok(result)
% bundle exec ruby prstyle.rb --debug https://github.com/jordansissel/fpm/pull/947
Cloning into '/var/folders/4r/4fpyt_2d1qvfrgb2fnngrqm40000gn/T/studtmp-9eeb66f7dc8cf5aeabe08598b0dec47d1e652126ccf53d56d888045949dd'...
...
From https://github.com/jordansissel/fpm
* [new ref] refs/pull/947/head -> origin/pull/947
Branch pull-request set up to track remote branch pull/947 from origin.
...
=> Running rubocop
Showing rubocop complaints about new code in this PR:
Offense at b/lib/fpm/package/virtualenv.rb:19
require "ffi"
class RUsage < FFI::Struct
module LibC
extend FFI::Library
ffi_lib ["libc.so.6", "libc"]
attach_function :getrusage, [:int, :pointer], :int
end
This file has been truncated, but you can view the full file.
logstash-1.5.0.rc1.1/bin/
logstash-1.5.0.rc1.1/bin/logstash
logstash-1.5.0.rc1.1/bin/logstash.bat
logstash-1.5.0.rc1.1/bin/logstash.lib.sh
logstash-1.5.0.rc1.1/bin/logstash-test
logstash-1.5.0.rc1.1/bin/plugin
logstash-1.5.0.rc1.1/bin/plugin.bat
logstash-1.5.0.rc1.1/bin/setup.bat
logstash-1.5.0.rc1.1/CHANGELOG
logstash-1.5.0.rc1.1/CONTRIBUTORS
% rvm ruby-1.9.3-p484,ruby-2.1.5,jruby-1.7.19 do ruby -rstringio -e 'p StringIO.ancestors'
[StringIO, IO::writable, IO::readable, Enumerable, Data, Object, Kernel, BasicObject]
[StringIO, IO::generic_writable, IO::generic_readable, Enumerable, Data, Object, Kernel, BasicObject]
[StringIO, Enumerable, Data, Object, Kernel, BasicObject]