Skip to content

Instantly share code, notes, and snippets.

set -g mouse on
setw -g mode-keys vi
list-keys -T copy-mode-vi
set-window-option -g mode-keys vi
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
filter f_local_sshd_login_coop { program("sshd") or program("systemd-logind") };
filter f_local_apache_coop { program("apache") };
filter f_local_daemon_coop { facility(3) and not program("named") };
filter f_local_kernel_coop { facility(0) };
filter f_local_coop { filter(f_local_sshd_login_coop) or filter(f_local_daemon_coop) or filter(f_local_kernel_coop) or filter(f_local_apache_coop) };
filter f_local_suri_coop { program("suricata") };
filter f_local_suri_coop_alert { match( "alert" value(".cee.event_type") type("string") ) };
parser p_cee { json-parser( marker("@cee:") prefix(".cee.")); };
@markuskont
markuskont / build-tensorflow-from-source.md
Created January 9, 2018 14:40 — forked from Brainiarc7/build-tensorflow-from-source.md
Build Tensorflow from source, for better performance

Building Tensorflow from source on Linux for maximum performance:

TensorFlow is now distributed under an Apache v2 open source license on GitHub.

Step 1. Install NVIDIA CUDA:

To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit.

Step 2. Install NVIDIA cuDNN:

@markuskont
markuskont / Vagrantfile
Last active December 28, 2023 03:42
Set up basic cuda/tensorflow/gpuR env with vagrant-libvirt and vfio pci-passthrough
# -*- mode: ruby -*-
# vi: set ft=ruby :
LIBVIRT_POOL = 'fast'
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu1604"
config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_udp: false
#config.vm.synced_folder "../../datastore/spindle/ML/datasets/", "/mnt", type: "nfs", nfs_udp: false
config.vm.network "private_network", :dev => "br0", :mode => 'bridge', :ip => "192.168.17.25"
#!/usr/bin/env python3
from elasticsearch import Elasticsearch, helpers
import json
es = Elasticsearch(
hosts=[
'host:9200'
]
)
FROM debian:stretch
RUN apt-get update && apt-get install -qq -y \
git \
build-essential \
autogen \
autoconf \
libtool \
pkg-config \
python \
@markuskont
markuskont / nodejs.sls
Created November 24, 2017 11:18
Deploy nodejs using saltstack
nodejs.{{ pillar.nodejs.build_dir }}:
file.directory:
- name: {{ pillar.nodejs.build_dir }}
- makedirs: True
nodejs.{{ pillar.nodejs.deploy_dir }}:
file.directory:
- name: {{ pillar.nodejs.deploy_dir }}
- makedirs: True
nodejs.install:
@markuskont
markuskont / rsyslog-docker.Dockerfile
Last active November 25, 2017 17:10
Dockerfile for building latest Rsyslog
FROM debian:stretch
RUN apt-get update && apt-get install -qq -y git build-essential autogen autoconf libtool pkg-config checkinstall
ENV INSTALL_PATH /src
RUN mkdir -p $INSTALL_PATH
WORKDIR $INSTALL_PATH
RUN git clone https://github.com/rsyslog/rsyslog/ \
&& cd rsyslog \
FROM ubuntu:16.04
RUN apt-get update && apt-get install -qq -y build-essential nodejs libpq-dev git ca-certificates libpcap-dev python3 python3-pip
ENV INSTALL_PATH /src
RUN mkdir -p $INSTALL_PATH
WORKDIR $INSTALL_PATH
RUN git clone https://github.com/p0f/p0f.git \
&& cd p0f \
@markuskont
markuskont / sarama-basic.go
Last active November 2, 2017 13:43
Basic code to get started with apache Kafka (tested on 1.0.0) and go 1.9 sarama library
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"strings"
"github.com/Shopify/sarama"