Skip to content

Instantly share code, notes, and snippets.

View xemoe's full-sized avatar
🏠
Working from home

Teerapong Ladlee xemoe

🏠
Working from home
  • Bangkok, Thailand
View GitHub Profile
@xemoe
xemoe / logstash-fast.conf
Created May 16, 2014 03:00
Logstash fastalert-suricata config
input {
file {
path => "/opt/suricata/log/json-archives/*/*"
codec => json
type => "filejson"
start_position => "beginning"
sincedb_path => "/opt/suricata/sincedb/filejson.sincedb"
}
file {
path => "/opt/suricata/log/archives/*/*"
@xemoe
xemoe / fastalert-mapping.sh
Created May 16, 2014 02:58
Fastalert mapping
#!/bin/bash
curl -XPUT http://localhost:9200/_template/fastalert -d '
{
"template": "fastalert*",
"mappings": {
"fastalert": {
"properties": {
"@timestamp": {
"type": "date"
@xemoe
xemoe / java_multiple
Last active August 29, 2015 13:57
Java use multi version
alias java_ls='/usr/libexec/java_home -V 2>&1 | grep -E "\d.\d.\d_\d\d" | cut -d , -f 1 | colrm 1 4 | grep -v Home'
function java_use() {
export JAVA_HOME=$(/usr/libexec/java_home -v $1)
export PATH=$JAVA_HOME/bin:$PATH
java -version
}