Skip to content

Instantly share code, notes, and snippets.

@itayw
itayw / system details
Created January 17, 2017 17:38
system details
inxi -Sr
@itayw
itayw / message.raw.json
Created December 1, 2016 08:25
message.raw
"message": {
"index": "analyzed",
"omit_norms": true,
"type": "string",
"fields": {
"raw": {
"index": "not_analyzed",
"type": "string",
"doc_values": true
}
@itayw
itayw / rules.js
Last active December 1, 2016 10:15
rules.js
exports.transform = function (event) {
if (event.categoryDeviceGroup === '/IDS/Host/Antivirus' && (event.categoryObject === '/Host/Resource/File' || event.categoryObject === '/Host/Application/Malware')) {
if (event.categoryObject === '/Host/Resource/File')
event.echo_malwareName = event.deviceCustomString1;
else if (event.categoryObject === '/Host/Application/Malware')
event.echo_malwareName = event.name;
event.echo_actionTaken = event.deviceAction;
if (event.destinationUserName && !event.sourceUserName)
event.echo_antivirusUsername = event.destinationUserName;
else if (!event.destinationUserName && event.sourceUserName)
@itayw
itayw / crontab
Last active July 12, 2016 09:48
kibana backup by cron
* * * * * echo "Hello from Echo" >> /var/log/cron.log 2>&1
0 20 * * * elasticdump --input http://elastic:9200/.kibana --output /backup/kibana/kibana-`date +%Y-%m-%H\ %k:%M:%S`.json
http://home.mcafee.com/VirusInfo/VirusProfile.aspx?key=153464#none
module.exports = function(kibana) {
return new kibana.Plugin({
require: ['kibana', 'elasticsearch'],
uiExports: {
/*
app: {
title: '**********',
description: '***************',
icon: 'plugins/*********/icon.svg',
main: 'plugins/echo-ui-plugin-contextify/app',
@itayw
itayw / sample.html
Created May 10, 2016 06:03
collapse enrichment
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true" style="min-width:350px;">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Collapsible Group Item #1
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
@itayw
itayw / stack
Last active February 29, 2016 06:55
Create a Leaflet custom checkbox control
http://stackoverflow.com/questions/25763626/create-a-leaflet-custom-checkbox-control
@itayw
itayw / test.js
Last active February 4, 2016 10:32
JA-9034 - Redis size limit test
var
fs = require('fs'),
path = require('path'),
redis = require('redis'),
client = redis.createClient();
var fixture = fs.readFileSync(path.join(__dirname, 'fixture.txt'));
client.rpush('test-q-for-verint', fixture, redis.print);
client.lpop('test-q-for-verint', function(err, result) {
if (err)
@itayw
itayw / Dockerfile.yml
Created January 21, 2016 07:50
beaker running apache-spark-node
FROM beakernotebook/beaker
MAINTAINER "Itay Weinberger <[email protected]>"
# Install Node.js 5.x, the FROM image is still using 0.12
ENV NODE_VERSION v5.1.0
RUN wget --no-check-certificate https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.gz && \
tar -C /usr/local --strip-components 1 -xzf node-$NODE_VERSION-linux-x64.tar.gz && \
rm node-$NODE_VERSION-linux-x64.tar.gz