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
import argparse | |
import sys | |
class Command(object): | |
def __init__(self): | |
self._argument_parser = argparse.ArgumentParser() | |
def main(self, args): | |
self._main(self._argument_parser.parse_args(args)) |
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
tag=firewall action=deny | |
| stats count values(dst) by src | |
| eventstats avg(count) as avg_count | |
| eval standard_deviation=count/avg_count | |
| fields - count, avg_count | |
| search standard_deviation > 10 |
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
// Generated by CoffeeScript 1.4.0 | |
(function() { | |
var NamedParameters, exports; | |
NamedParameters = (function() { | |
var _assert, _clone; | |
function NamedParameters(m) { | |
this.map = _clone(m); | |
this.coerce_all = false; |
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
import 'reflect-metadata'; | |
let _contractDictMetadataKey = 'contractDict'; | |
let ApplyContracts = () => { | |
return (target, key) => { | |
let originalMethod = target[key]; | |
let contractDict = Reflect.getOwnMetadata(_contractDictMetadataKey, target, key); |
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
/* | |
* Webpack config | |
*/ | |
/* Use file-loader for images. */ | |
{ | |
test: /\.(gif|ico|jpg|png|svg)$/, | |
loader: 'file' | |
} |
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
@Injectable() | |
export class ComponentInjector { | |
constructor( | |
private _injector: Injector, | |
private _applicationRef: ApplicationRef, | |
private _componentFactoryResolver: ComponentFactoryResolver) { | |
} |
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
import { ReplaySubject } from 'rxjs/ReplaySubject'; | |
import { Observable } from 'rxjs/Observable'; | |
export abstract class ReplayStore<T> { | |
private _isInitialized = false; | |
private _state: T; | |
private _state$: ReplaySubject<T>; | |
constructor() { |
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
stats count by user fqdn | |
| eventstats sum(count) as count_by_user by user | |
| eval percent=count/count_by_user | |
| table user, fqdn, percent, count, count_by_user | |
| sort - percent | |
| search count_by_user > 100 |
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
#!/usr/bin/env bash | |
# Generate private key and CSR. | |
openssl req -nodes -newkey rsa:2048 -keyout ssl/server.key -out ssl/server.csr -subj "//CN=devserver" | |
# Auto-signing. | |
#openssl req -x509 -sha256 -days 365 -key ssl/server.key -in ssl/server.csr -out ssl/server.pem | |
openssl x509 -req -days 365 -in ssl/server.csr -signkey ssl/server.key -out ssl/server.crt | |
# Removing CSR. |
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
// Create an order. | |
POST /orders | |
request = { | |
title: 'TITLE', | |
description: 'DESCRIPTION' | |
} | |
response = { | |
id: 'ORDER_ID', | |
title: 'TITLE', |
OlderNewer