Skip to content

Instantly share code, notes, and snippets.

View Paladin's full-sized avatar

Arlen Walker Paladin

View GitHub Profile
@Paladin
Paladin / gist:3883190
Created October 13, 2012 04:11
jRuby-head install log
/Users/arlenwalker/.rvm/rubies/jruby-head/bin/jruby extconf.rb
Use RbConfig instead of obsolete and deprecated Config.
make
make -f inc/Makefile-rules.mk CONF=unix SUBPROJECTS= .build-conf
make -f inc/Makefile-rules.mk jruby
mkdir -p build/unix/Darwin
rm -f build/unix/Darwin/argparser.o.d
g++ -O2 -Wall -c argparser.cpp -MMD -MP -MF build/unix/Darwin/argparser.o.d -o build/unix/Darwin/argparser.o
mkdir -p build/unix/Darwin
@Paladin
Paladin / gist:5273393
Last active December 15, 2015 14:19
Not sure how "more code" helps, Joel, but...
$fred = "Joe";
$fred::myName(); // makes a static call to Joe::myname();
class Sam
{
public $fred = "Joe";
function whoAreYou()
{
$this->fred::myName(); // Erors out with unexpected :: error
}
@Paladin
Paladin / gist:d3c53b8e677e36d67baa
Created June 1, 2014 00:03
There has to be a better way!
default.xml:
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_PGN_GAME_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_PGN_GAME_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="request">
Here's the filter itself. You'll note one difference between it and standalone: the field 'tz'. This is because that field is added in along with 'type' with the logstash-fowarder config:
filter {
if [type] == "syslog" {
grok {
match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
add_field => [ "received_at", "%{@timestamp}" ]
add_field => [ "received_from", "%{host}" ]
# add_field => [ "tz", "EST"]
}
{
"metricbeat-6.3.2" : {
"order" : 1,
"index_patterns" : [
"metricbeat-6.3.2-*"
],
"settings" : {
"index" : {
"codec" : "best_compression",
"mapping" : {