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
// Use with: | |
// m.Before(filter.Filter) | |
// | |
package filter | |
import ( | |
"fmt" | |
"net/http" |
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 BaseHTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
import sys | |
import base64 | |
key = "" | |
class AuthHandler(SimpleHTTPRequestHandler): | |
''' Main class to present webpages and authentication. ''' | |
def do_HEAD(self): |
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
#!/bin/sh | |
broctl top | awk '{print $6}' | sed 's/M//' | tail -n +2 | paste -sd+ | bc |
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 BroControl.plugin | |
import sys | |
import os | |
class TuneBro(BroControl.plugin.Plugin): | |
def __init__(self): | |
super(TuneBro, self).__init__(apiversion=1) | |
def name(self): | |
return "TuneBro" |
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
#!/usr/bin/env python | |
# | |
# ~5 is average and okay | |
# | |
import os | |
import sys | |
import time | |
DEFAULT_LOG = "/usr/local/bro/logs/current/dns.log" |
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 os | |
import socket | |
import slack | |
import slack.chat | |
from optparse import OptionParser, OptionGroup | |
G_USERNAME = 'MY_USERNAME' | |
G_CHANNEL = '#MY_CHANNEL' | |
G_API_TOKEN = 'MY_API_TOKEN' |
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 main | |
import ( | |
"os" | |
"fmt" | |
"github.com/bluele/slack" | |
) | |
var ( | |
Version string | |
Build string |
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
Name: jemalloc | |
Version: 5.1.0 | |
Release: 3%{?dist} | |
Summary: General-purpose scalable concurrent malloc implementation | |
Group: System Environment/Libraries | |
License: BSD | |
URL: http://www.canonware.com/jemalloc/ | |
Source0: https://github.com/jemalloc/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2 |
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
Name: jemalloc | |
Version: 5.1.0 | |
Release: 3%{?dist} | |
Summary: General-purpose scalable concurrent malloc implementation | |
Group: System Environment/Libraries | |
License: BSD | |
URL: http://www.canonware.com/jemalloc/ | |
Source0: https://github.com/jemalloc/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2 |
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
class RRPartitionerCb : public RdKafka::PartitionerCb { | |
public: | |
RRPartitionerCb() { partition = 0; } | |
int32_t partitioner_cb(const RdKafka::Topic *topic, | |
const std::string *key, | |
int32_t partition_cnt, | |
void *msg_opaque) { | |
if((partition+1) > (partition_cnt-1)) { | |
partition = 0; | |
return partition; |
NewerOlder