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
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(Service.App_Start.NinjectWebCommon), "Start")] | |
[assembly: WebActivatorEx.ApplicationShutdownMethodAttribute(typeof(Service.App_Start.NinjectWebCommon), "Stop")] | |
// Once it's building, rename the class away from Ninject. | |
public static class NinjectWebCommon | |
{ | |
// -- Ninject | |
// private static readonly Bootstrapper bootstrapper = new Bootstrapper(); | |
public static void Start() |
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 json | |
from bson import json_util, ObjectId | |
from flask import Flask | |
from flask import request | |
import flask | |
from pymongo import MongoClient | |
app = Flask(__name__) | |
app.debug = True |
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
%{IP:client} - - \[(?<timestamp>%{MONTHDAY}[./-]%{MONTH}[./-]%{YEAR}:%{TIME}\s+%{ISO8601_TIMEZONE})] \"%{WORD:verb} %{URIPATHPARAM:uri}\s+HTTP.+?\" %{NUMBER:status} %{NUMBER:response_time} |
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
filter { | |
## WebLogic Server Http Access Log | |
if [type] == "weblogic-access" { | |
grok { | |
match => [ "message", "%{IP:client} - - \[(?<timestamp>%{MONTHDAY}[./-]%{MONTH}[./-]%{YEAR}:%{TIME}\s+%{ISO8601_TIMEZONE})] \"%{WORD:verb} %{URIPATHPARAM:uri}\s+HTTP.+?\" %{NUMBER:status} %{NUMBER:response_time}" ] | |
} | |
date { | |
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ] | |
} | |
} |
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
digraph G { | |
"Find Driving Instructor" -> "Book Lessons" -> "Learn To Drive" -> "Book Practical Test" -> "Pass Practical Test"; | |
"Study for Theory Test" -> "Book Theory Test" -> "Pass Theory Test" -> "Book Practical Test"; | |
"Pass Practical Test" -> "Buy Car" -> "Buy Insurance" -> "Pay Tax" -> "Drive Somewhere Nice"; | |
"Decide Which Car To Buy" -> "Buy Car" | |
} |
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
digraph G { | |
/* Set graph background attributes */ | |
style=filled; | |
bgcolor="#548881"; | |
rankdir=LR; /* Comment out if you want it to be oriented top to bottom */ | |
/* Set default shape to be a box rather than an ellipse */ | |
node [shape=box, fontsize=11, fontname="Calibri Bold", color="#2E5F58", style=filled, fillcolor="#2E5F58", fontcolor="#ffffff"]; | |
/* Style the arrows, because I think that the arrow head is too big by default */ | |
edge [color="#9DC8C2", arrowsize=0.5]; | |
/* Tasks */ |
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
@startuml | |
' http://plantuml.com/skinparam.html | |
skinparam handwritten true | |
skinparam monochrome true | |
skinparam packageStyle rect | |
skinparam defaultFontName FG Virgil | |
skinparam shadowing false | |
title Authentication Sequence |
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: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
config.vm.box = "bento/centos-7.1" |
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
bash ./02_update_cluster.sh | |
SSH password: | |
PLAY [common] ***************************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [mongo2] | |
ok: [mongo4] | |
ok: [mongo5] | |
ok: [mongo3] |
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 pymongo.errors import AutoReconnect | |
from pymongo import MongoClient | |
import pprint | |
from itertools import islice | |
def get_chunks(iterable, max_chunk_size): | |
temp = list() | |
for item in iterable: | |
temp.append(item) |