Skip to content

Instantly share code, notes, and snippets.

##############################
# DERIVED FIELDS
##############################
[derivedfields]
# These fields will be extracted from all processed events, and added as new fields in case an outlier event is found.
# The format for the new field will be: outlier.<field_name>, for example: outliers.initials
# The format to use is GROK. These fields are extracted BEFORE the analysis happens, which means that these fields can also be used as for example aggregators or targets in use cases.
timestamp=%{YEAR:timestamp_year}-%{MONTHNUM:timestamp_month}-%{MONTHDAY:timestamp_day}[T ]%{HOUR:timestamp_hour}:?%{MINUTE:timestamp_minute}(?::?%{SECOND:timestamp_second})?%{ISO8601_TIMEZONE:timestamp_timezone}?
@daanraman
daanraman / .block
Last active November 8, 2016 18:25
fresh block
license: mit
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<div class="searchcontainer">
<input id="search">
@daanraman
daanraman / gist:fb91eed418d5bf19f135
Created April 14, 2015 14:55
MIPS instruction reference
http://www.mrc.uidaho.edu/mrc/people/jff/digital/MIPSir.html
@daanraman
daanraman / gist:a0475e7c788a1fe1bf5d
Last active August 29, 2015 14:18
Adding SMTP support in MediaWiki
Add the following to LocalSettings.php
$wgSMTP = array(
'host' => 'smtp.gmail.com',
'IDHost' => "wikibiz.vn",
'port' => 587,
'auth' => true,
'username' => myusername@gmail.com
'password' => "mypassword"
);
@daanraman
daanraman / gist:af19d0b7f8fefdbc49a4
Created April 2, 2015 15:51
Shorter and beautiful URL's in Mediawiki (and removing index.php)
.htaccess:
----------
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
LocalSettings.php:
------------------
@daanraman
daanraman / gist:f6eb7f722787e87589b8
Created April 2, 2015 09:45
Make the size of the WikiMedia logo fixed (Vector template)
File: skins/Vector/VectorTemplate.php
<div id="p-logo" role="banner"><a style="background-image: url(<?php
$this->text( 'logopath' )
?>);background-size:155px;" href="<?php
@daanraman
daanraman / gist:ffbee6fc5d5c0e7f29dc
Created March 30, 2015 06:51
Check if an Android application contains native code (JNI)
for i in $(find . -type d -maxdepth 1 | cut -c3-)
do
cd "$i"
if [ -d "lib" ]; then
# Control will enter here if $DIRECTORY exists.
native=`expr $native + 1`
else
nonnative=`expr $nonnative + 1`
fi
cd ..
@daanraman
daanraman / gist:6398218
Last active December 22, 2015 01:39
Doctrine Cheat Sheet
=============INSTALL DOCTRINE IN CI=============
1. Copy Doctrine/ and Doctrine.php into application/libraries
2. Create folders Entities/ Proxies/ Mappings/ in models
3. Copy doctrine-cli.php into application/
=============NEW ENTITIES=============
1. Generate entities from descritions in YAML files:
----------------------------------------------------