This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
using System.Xml; | |
using System.Xml.Linq; | |
namespace Formix.Utils | |
{ | |
class Program |
This file contains 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
( function(root, factory) { | |
root.pubsub = factory(root); | |
}(this, function() { | |
var publishEmitter; | |
var directory; | |
var eventStream; | |
var SubscriptionDefinition = function(stream, callback) { | |
this.stream = stream; |
This file contains 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 | |
if [ "$1" = "" ]; then | |
echo "Usage: ./ksh <pod>" | |
exit 1 | |
fi | |
echo Getting pods... | |
PODS=$(kubectl get pods --no-headers --output=name | grep $1) | |
PODS=(${PODS}) | |
NUM_PODS=${#PODS[@]} |
This file contains 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
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod |
This file contains 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
There are two parts to this: | |
1. The main Python code that uses requests + json to parse the events | |
2. The external Jinja2 template that the data is rendered by, producing the HTML output | |
# ---------------------------------------------------------------------------------------------------------------- | |
#!/usr/bin/env python3 | |
import json |
This file contains 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
Add the `replication` section to the mongod.conf file: | |
``` | |
$cat /usr/local/etc/mongod.conf | |
systemLog: | |
destination: file | |
path: /usr/local/var/log/mongodb/mongo.log | |
logAppend: true | |
storage: | |
engine: mmapv1 |