Skip to content

Instantly share code, notes, and snippets.

View Dexterp37's full-sized avatar

Alessio Placitelli Dexterp37

View GitHub Profile
@badboy
badboy / main.rs
Last active April 16, 2018 17:33
extern crate reqwest;
extern crate flate2;
extern crate chrono;
#[macro_use]
extern crate log;
extern crate env_logger;
use std::process;
use std::env;
use std::fs::{self, File};

Getting Started (writing your first Analysis Plugin)

Creating an analysis plugin consists of three steps:

  1. Writing a message matcher

    The message matcher allows one to select specific data from the data stream.

  2. Writing the analysis code/business logic

@jaredhanson
jaredhanson / gist:3989193
Created October 31, 2012 19:13
Node Knockout 2012 - Getting Started with Passport
var express = require('express'),
passport = require('passport'),
TwitterStrategy = require('passport-twitter').Strategy,
ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn,
app = express();
app.use(express.static(__dirname + '/public'));
app.use(express.cookieParser());
app.use(express.session({ secret: 'keyboard cat' }));
app.use(passport.initialize());
@jaredhanson
jaredhanson / gist:2559730
Created April 30, 2012 16:20
Restify and Passport /cc Hal Robertson
// Based off example code from Hal Robertson
// https://github.com/halrobertson/test-restify-passport-facebook
// See discussion: https://groups.google.com/forum/?fromgroups#!topic/passportjs/zCz0nXB_gao
var restify = require('restify')
// config vars
var FB_LOGIN_PATH = '/api/facebook_login'
var FB_CALLBACK_PATH = '/api/facebook_callback'
var FB_APPID = '<<YOUR APPID HERE>>'