Skip to content

Instantly share code, notes, and snippets.

View c0psrul3's full-sized avatar

Mike c0psrul3

View GitHub Profile
@rsvp
rsvp / httpstatus
Created August 25, 2011 18:00
httpstatus : bash script to get HTTP response code with optional status message (includes verbose definitions in comment)
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-08-25
#
# _______________| httpstatus : get HTTP status code
#
# Usage: httpstatus URL [timeout] [--code or --status] [see 4.]
# ^message with code (default)
# ^code (numeric only)
# ^in secs (default: 3)
# ^URL without "http://" prefix works fine.
@mdigital
mdigital / tarsnap-install.sh
Created April 18, 2012 02:40
Debian / Ubuntu Tarsnap installation
#!/bin/sh
# Installs tarsnap client on Debian and Ubuntu
#
# You'll need to setup an account at
# http://www.tarsnap.com
# and load it with some funds
#
# Make sure you run this as root
#
@acg
acg / csv2tsv
Created April 4, 2013 17:14
Convert csv to tsv with optional escaping.
#!/usr/bin/env perl
use Text::CSV;
use Getopt::Long qw/ GetOptionsFromArray :config pass_through /;
use warnings;
use strict;
my $usage = "usage: $0 [-e] < file.csv\n";
exit main( @ARGV );
@acg
acg / tsv2csv
Last active January 10, 2019 05:00
Convert tsv to csv with optional unescaping.
#!/usr/bin/env perl
use Text::CSV;
use Getopt::Long qw/ GetOptionsFromArray :config pass_through /;
use warnings;
use strict;
my $usage = "usage: $0 [-e] < file.tsv\n";
exit main( @ARGV );
@bryanjswift
bryanjswift / abbreviated-unbound.conf
Last active September 19, 2022 05:02
Unbound (http://unbound.net/) configuration for local network device testing.
# The server clause sets the main parameters.
server:
# Allow network connections outside of localhost
interface: 0.0.0.0
# Don't automatically run in the background because I want to be able to kill it without hunting a pid
do-daemonize: no
# TODO: Change this to your network range, like `192.168.0.0/16 allow`
access-control: 10.0.0.0/16 allow
# TODO: Change this to your username, or whatever user you want to run/own the `unbound` process
username: "bryanjswift"
@sw00
sw00 / ansible.inventory_params
Created May 28, 2014 13:39
List of ansible inventory behaviour parameters.
ansible_ssh_host
The name of the host to connect to, if different from the alias you wish to give to it.
ansible_ssh_port
The ssh port number, if not 22
ansible_ssh_user
The default ssh user name to use.
ansible_ssh_pass
The ssh password to use (this is insecure, we strongly recommend using --ask-pass or SSH keys)
ansible_sudo_pass
The sudo password to use (this is insecure, we strongly recommend using --ask-sudo-pass)
@phryneas
phryneas / 00-README.md
Last active July 26, 2016 23:54
dnssec, openpgpkey, dane, sshfp

this is a short run-down of setting up dnssec, openpgpkey, dane and sshfp records if you already have a working bind installation

if you need a secondary DNS server that supports DNSSEC (the chances are high if you are not hosting two DNS servers yourself), take a look at https://freedns.afraid.org/ - it's free for basic usage (which is absolutely enough) and works like a charm!

@andrewkroh
andrewkroh / install-golang1.5.1-solaris.sh
Last active November 20, 2017 13:22
Install Golang 1.5.1 on Solaris
#!/bin/bash -e
function setup_profile() {
profile=$1
cat << 'EOF' >> $profile
export GOROOT=/go1.5.1-solaris
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
[ ! -d "$GOPATH" ] && mkdir $GOPATH
EOF
@thisismitch
thisismitch / filebeat-index-template.json
Last active February 28, 2020 21:11
Filebeat configuration with comments removed
{
"mappings": {
"_default_": {
"_all": {
"enabled": true,
"norms": {
"enabled": false
}
},
"dynamic_templates": [
@narutaro
narutaro / NetFlow real-time analysis with Fluentd.md
Last active July 18, 2019 05:44
NetFlow real-time analysis with Fluentd

#Is NetFlow streaming data analysis possible with fluentd?

I wanted to do some analysis against NetFlow data that I receive everyday. The analyis that I wanna do is various. It is simple pattern matching for a specific IP address, detecting specifc traffic pattern, figuring out network graph and calicurate proximity of certain nodes and so on so forth. I might use norikura plug-in for that purpose later but not sure now.

I know storm, kafuka, spark streaming and even memSQL and VoltDB are good for this purpose but wanted to go with quick way for now.

#Captureing NetFlow with fluentd

I use this NetFlow plug-in on fluentd