Install pandoc on Mac OS X 10.8
$ brew install haskell-platform
#Author: Marcel Pinheiro Caraciolo | |
#Confusion Matrix Generator | |
#Version: 0.1 | |
#email: caraciol at gmail . com | |
from pprint import pprint as _pretty_print | |
import math | |
class ConfusionMatrix(object): |
from django.test import TestCase | |
from django.utils.importlib import import_module | |
from django.http import HttpRequest | |
from django.conf import settings | |
class SampleTest(TestCase): | |
def setUp(self): | |
# Create mock request object with session key | |
engine = import_module(settings.SESSION_ENGINE) | |
request = HttpRequest() |
#!/bin/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
#!/usr/bin/env python | |
# coding: utf-8 | |
#---------------------------------------------------- | |
# packet capture & decoding | |
import pcapy | |
import dpkt | |
class network_monitor: | |
def __init__ (self): |
<!DOCTYPE html public "✰"> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>getUserMedia Video Example</title> | |
</head> | |
<body> | |
<button type="button" onclick="toggle()"> | |
Toggle Video | |
</button> |
#!KAMAILIO | |
# | |
# Kamailio (OpenSER) SIP Server v4.1 - default configuration script | |
# - web: http://www.kamailio.org | |
# - git: http://sip-router.org | |
# | |
# Direct your questions about this file to: <[email protected]> | |
# | |
# Refer to the Core CookBook at http://www.kamailio.org/wiki/ | |
# for an explanation of possible statements, functions and parameters. |
WebSocket.prototype._send = WebSocket.prototype.send; | |
WebSocket.prototype.send = function (data) { | |
console.log("\u2192 " + data); | |
this._send(data); | |
this.addEventListener('message', function (msg) { | |
console.log('\u2190 ' + msg.data); | |
}, false); | |
this.send = function (data) { | |
this._send(data); | |
console.log("\u2192 " + data); |
from concurrent.futures import ThreadPoolExecutor | |
from functools import partial, wraps | |
import time | |
import tornado.ioloop | |
import tornado.web | |
EXECUTOR = ThreadPoolExecutor(max_workers=4) |
# This playbook installs and configure corosync and pacemaker on a set of nodes part of a given group. | |
--- | |
# See the file /etc/ansible/hosts where the group is actually defined. There might be a way to define groups in a file 'closer' to this playbook. | |
- hosts: clusternodes | |
vars: | |
mcastport : 5405 | |
tasks: | |
# It would be better to use Ansible to change the IP tables config to allow corosync/pacemaker on the nodes part of the cluster. |
$ brew install haskell-platform