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
import org.graylog2.plugin.Message | |
rule "reproduce IRC issue" | |
when | |
m : Message( getField("message") matches "(?i).*mycrazystringtotrack(.|\n|\r)*" ) | |
then | |
m.addField("track", "crazystring" ); | |
System.out.println("matched!"); | |
end |
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
2.0.0p0 :001 > Time.now | |
=> 2014-02-21 19:41:13 +0100 | |
2.0.0p0 :002 > Time.now.utc.iso8601 | |
NoMethodError: undefined method `iso8601' for 2014-02-21 18:41:16 UTC:Time | |
from (irb):2 | |
from /Users/lennart/.rvm/rubies/ruby-2.0.0-p0/bin/irb:16:in `<main>' | |
2.0.0p0 :003 > require 'time' | |
=> true | |
2.0.0p0 :004 > Time.now.utc.iso8601 | |
=> "2014-02-21T18:41:20Z" |
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
2014-03-13 12:05:13,673 INFO : org.graylog2.Core - SIGNAL received. Shutting down. | |
2014-03-13 12:05:13,676 INFO : org.graylog2.system.shutdown.GracefulShutdown - Graceful shutdown initiated. | |
2014-03-13 12:05:14,677 INFO : org.graylog2.system.shutdown.GracefulShutdown - Attempting to close input <org.graylog2.inputs.random.FakeHttpMessageInput.52d693bb300492055ae543f5> [Random HTTP message generator]. | |
2014-03-13 12:05:14,678 INFO : org.graylog2.system.shutdown.GracefulShutdown - Input [org.graylog2.inputs.random.FakeHttpMessageInput.52d693bb300492055ae543f5] closed. Took [0ms] | |
2014-03-13 12:05:14,678 INFO : org.graylog2.system.shutdown.GracefulShutdown - Attempting to close input <org.graylog2.inputs.gelf.udp.GELFUDPInput.52ddb63b300472bb4ed52012> [GELF UDP]. | |
2014-03-13 12:05:14,680 INFO : org.graylog2.system.shutdown.GracefulShutdown - Input [org.graylog2.inputs.gelf.udp.GELFUDPInput.52ddb63b300472bb4ed52012] closed. Took [2ms] | |
2014-03-13 12:05:14,681 INFO : org.graylog2.system.shutdown.GracefulShutdown - Att |
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
lennart ~/workspace/graylog2/graylog2-server(0.20)$ mongo | |
MongoDB shell version: 2.4.1 | |
connecting to: test | |
> use graylog2 | |
switched to db graylog2 | |
> db.system_messages.remove() |
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
helper_method :get_last_commit | |
def get_last_commit | |
require 'cobravsmongoose' | |
require 'open-uri' | |
response = open("http://github.com/api/v1/xml/lennartkoopmann/scopeport-server/commits/master").read | |
commits = CobraVsMongoose.xml_to_hash(response) | |
author_name = commits["commits"]["commit"][0]["author"]["name"]["$"] | |
message = commits["commits"]["commit"][0]["message"]["$"] |
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
helper_method :get_last_commit | |
def get_last_commit | |
require "cobravsmongoose" | |
require "open-uri" | |
require "timeout" | |
retries = 1 | |
response = ""; | |
begin |
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
def permission? | |
user = current_user | |
controller = params[:controller] | |
action = params[:action] | |
id = params[:id] | |
# Okay, the user is an administrator. Allow all access. | |
return true if user.admin | |
# Fine grained access rules. |
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/ruby | |
require File.join("/usr/lib/ruby/gems/1.8/gems/octopi-0.0.9/lib/octopi.rb") | |
include Octopi | |
require "mysql" | |
# Connect to database. | |
con = Mysql.real_connect "localhost", "user", "password", "database" | |
# Fetch all repos |
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
def flip_order_direction str | |
"desc" if str == "asc" | |
"asc" if str == "desc" | |
end |
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
Tue Aug 25 00:59:56 2009 - serviceChecks(): Started | |
Tue Aug 25 00:59:56 2009 - serviceChecks(): In loop. | |
Tue Aug 25 00:59:56 2009 - serviceChecks(): Connected to database. | |
Tue Aug 25 00:59:56 2009 - serviceChecks(): Fetched 1 services that need to get a serviceHandler() | |
Tue Aug 25 00:59:56 2009 - serviceChecks(): Starting serviceHandler() 0 | |
Tue Aug 25 00:59:56 2009 - serviceChecks(): Started serviceHandler() 0 | |
Tue Aug 25 00:59:56 2009 - serviceHandler(): Started. | |
Tue Aug 25 00:59:56 2009 - serviceHandler() 622761: Connected to database. | |
Tue Aug 25 00:59:56 2009 - serviceHandler() 622761: Initial query succeeded. | |
Tue Aug 25 00:59:56 2009 - serviceHandler() 622761: A service to handle has been fetched. |
OlderNewer