This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
| from zipfile import ZipFile | |
| from string import join | |
| import os | |
| import re | |
| def getMavenCoordinates(elements): | |
| return dict(zip(('group', 'artifact', 'version'), elements)) | |
| def getMavenArtifactName(coordinates): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; -*- mode: clojure; -*- | |
| ; vim: filetype=clojure | |
| (logging/init :file "/var/log/riemann/riemann.log") | |
| ; Listen on the local interface over TCP (5555), UDP (5555), and websockets | |
| ; (5556) | |
| (let [host "127.0.0.1"] | |
| (tcp-server :host host) | |
| (udp-server :host host) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.robotninjas.audio; | |
| import com.google.common.base.Ticker; | |
| import com.google.common.primitives.Longs; | |
| import java.util.concurrent.Callable; | |
| import java.util.concurrent.Delayed; | |
| import java.util.concurrent.FutureTask; | |
| import java.util.concurrent.TimeUnit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.robotninjas.audio; | |
| import com.google.common.util.concurrent.*; | |
| import java.util.concurrent.Callable; | |
| import java.util.concurrent.ExecutionException; | |
| import java.util.concurrent.ScheduledFuture; | |
| import java.util.concurrent.TimeUnit; | |
| import static com.google.common.util.concurrent.MoreExecutors.listeningDecorator; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Copyright 2013 David Rusek <dave.rusek@gmail.com> | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.google.common.util.concurrent.*; | |
| import org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS; | |
| import org.apache.commons.dbcp.datasources.SharedPoolDataSource; | |
| import org.apache.commons.dbutils.AsyncQueryRunner; | |
| import org.apache.commons.dbutils.ResultSetHandler; | |
| import javax.sql.DataSource; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.util.concurrent.ThreadPoolExecutor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.junit.Test; | |
| import java.util.concurrent.BlockingQueue; | |
| import java.util.concurrent.SynchronousQueue; | |
| import java.util.concurrent.ThreadPoolExecutor; | |
| import java.util.concurrent.TimeUnit; | |
| import static org.junit.Assert.assertFalse; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef __LOGGING_H__ | |
| #define __LOGGING_H__ | |
| #include <jni.h> | |
| typedef enum { | |
| SEVERE = 0, | |
| WARNING, | |
| INFO, | |
| FINE, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by IntelliJ IDEA. | |
| * User: drusek | |
| * Date: 2/10/12 | |
| * Time: 12:40 PM | |
| * To change this template use File | Settings | File Templates. | |
| */ | |
| import com.sun.jna.*; | |
| import com.sun.jna.ptr.PointerByReference; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;WARNING: UNTESTED | |
| (ns flows | |
| (:import jpcap.JpcapCaptor)) | |
| (defrecord flow-tuple :src-ip :dst-ip :src-port :dst-port :protocol) | |
| (defrecord flow :flow-tuple :octets :first-update :last-update) | |
| (comment | |
| (defprotocol CaptureProtocol |