Skip to content

Instantly share code, notes, and snippets.

View rarruda's full-sized avatar

Renato Arruda rarruda

View GitHub Profile

Keybase proof

I hereby claim:

  • I am rarruda on github.
  • I am rarruda (https://keybase.io/rarruda) on keybase.
  • I have a public key whose fingerprint is D0BF 0A10 6415 2F8B 6C09 0152 A55C 8374 20D2 7CD4

To claim this, I am signing this object:

@rarruda
rarruda / git_lol.md
Last active March 18, 2021 09:40
Helpful git log aliases

Helpful git log aliases

git config --global alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit --all"
git config --global alias.lola "log --graph --pretty='format:%C(auto)%h%d %s %C(green)%an%C(bold blue) %ad' --all --date=relative"
diff --git a/lib/logstash/outputs/websocket/app.rb b/lib/logstash/outputs/websocket/app.rb
index b21ec9c..edffa11 100644
--- a/lib/logstash/outputs/websocket/app.rb
+++ b/lib/logstash/outputs/websocket/app.rb
@@ -19,7 +19,23 @@ class LogStash::Outputs::WebSocket::App < Sinatra::Base
@logger.debug("New websocket client")
stream(:keep_open) do |out|
@pubsub.subscribe do |event|
- ws.publish(event)
+ if params.empty?
# replace dots with underscores in the vhost field:
mutate {
type => "apache-access"
#gsub => [ "vhost", "[.]", "_" ]
gsub => [ "vhost", ".", "_" ]
tags => [ "vhost", "vhost-sub_site" ]
}