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
public class ApiOperationDescriptionAttribute : Attribute | |
{ | |
public string Description { get; set; } | |
public ApiOperationDescriptionAttribute(string description) | |
{ | |
Description = description; | |
} | |
} | |
public class LookupOperationFilter : IOperationFilter |
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 | |
# | |
# chkconfig: 2345 55 25 | |
# Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx | |
# For Debian, run: update-rc.d -f nginx defaults | |
# For CentOS, run: chkconfig --add nginx | |
# | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "AWS CloudFormation demo thingy", | |
"Parameters": { | |
"Environment": { | |
"Description": "Environment", | |
"Type": "String", | |
"MinLength": "3", | |
"MaxLength": "4", | |
"Default": "DEV", |
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
{ | |
"variables": { | |
"aws_access_key": "", | |
"aws_secret_key": "" | |
}, | |
"builders": [{ | |
"type": "amazon-ebs", | |
"access_key": "{{user `aws_access_key`}}", | |
"secret_key": "{{user `aws_secret_key`}}", | |
"region": "ap-southeast-2", |
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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation demo thingy", | |
"Parameters" : { | |
"KeyName": { | |
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the Elastic Beanstalk hosts", | |
"Type": "AWS::EC2::KeyPair::KeyName", |
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
var express = require('express'), | |
finder = require('finder-on-steroids'); | |
var app = express(); | |
app.use(express.static('../results')); | |
app.listen(9085); | |
app.get('/', function(req, res, next) { | |
finder('../results').files().depth(2).name('index.html').find().then(function(files) { |
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
log = "DateTime: 23/04/1998\r\nI'm just a message\r\nKey: value\r\nIm a url: http://cats.com\r\nError Description: I'm an error here is my stacktrace\r\n at stuff\r\n at more stuff\r\n\key with no value: \r\nI'm another random message line\r\n--------------------------------------------" | |
rows = log.split(/\r\n/).partition{|x| x.start_with?('Error Description: ',' at')} | |
event = {'Error'=>rows[0].join($/).sub('Error Description: ','')} | |
remove = [] | |
rows[1].each do |i| | |
i.scan(/(.+): (.*)/) do |x,y| | |
event[x.delete(' ')] = y | |
remove.push(i) | |
end |
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
input { | |
stdin { type => example } | |
file { | |
#any line not starting with a tleast 10 dashes belongs with the previous line | |
codec => multiline { | |
pattern => "^-{10,}" | |
negate => true | |
what => next | |
} | |
path => "C:/applogs/*.log" |
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.Globalization; | |
using System.Text; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using NLog; | |
using NLog.LayoutRenderers; | |
namespace Cats.Middleware.Logging | |
{ | |
[LayoutRenderer("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
<configuration> | |
<configSections> | |
<section name="secureAppSettings" type="System.Configuration.NameValueSectionHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | |
</configSections> | |
<secureAppSettings> | |
<add key="encryptMe" value="ImSuperSecret" /> | |
</secureAppSettings> | |
</configuration> |
NewerOlder