Skip to content

Instantly share code, notes, and snippets.

@smaglio81
smaglio81 / Enable-BoxstarterClientRemoting.ps1
Created August 8, 2016 23:12
small edit to prevent trustedhosts update
function Enable-BoxstarterClientRemoting {
<#
.SYNOPSIS
Enables and configures PowerShell remoting from the client
.DESCRIPTION
Enable-BoxstarterClientRemoting will check if PowerShell Remoting is enabled on the local
machine. If not, it will enable it and it will also add all remote hosts to trust to the
WSMAN trusted hosts list. The original trusted host list will be returned. When running
Install-BoxstarterPackage, Boxstarter will roll back to the original trusted hosts when
@smaglio81
smaglio81 / healthcheck.log
Created August 10, 2016 17:16
IIS log showing ARR/WFF healthcheck spamming
2016-08-10 00:00:00 10.0.555.555 GET /webservices/CrossCampusEnrollment/healthcheck - 80 - 10.0.555.556 - - 200 0 0 15
2016-08-10 00:00:00 10.0.555.555 GET /webservices/CrossCampusEnrollment/healthcheck - 80 - 10.0.555.556 - - 200 0 0 15
2016-08-10 00:00:00 10.0.555.555 GET /webservices/CrossCampusEnrollment/healthcheck - 80 - 10.0.555.556 - - 200 0 0 31
2016-08-10 00:00:00 10.0.555.555 GET /webservices/CrossCampusEnrollment/healthcheck - 80 - 10.0.555.556 - - 200 0 0 15
2016-08-10 00:00:00 10.0.555.555 GET /webservices/CrossCampusEnrollment/healthcheck - 80 - 10.0.555.556 - - 200 0 0 15
2016-08-10 00:00:00 10.0.555.555 GET /webservices/CrossCampusEnrollment/healthcheck - 80 - 10.0.555.556 - - 200 0 0 15
2016-08-10 00:00:00 10.0.555.555 GET /webservices/CrossCampusEnrollment/healthcheck - 80 - 10.0.555.556 - - 200 0 0 15
2016-08-10 00:00:00 10.0.555.555 GET /webservices/CrossCampusEnrollment/healthcheck - 80 - 10.0.555.556 - - 200 0 0 15
2016-08-10 00:00:00 10.0.555.555 GET /webservices/CrossCampusEnrollment/
using System.Collections.Generic;
using System.Web.Http.Description;
using Swashbuckle.Swagger;
namespace BoundedContext.Web.Swagger
{
public class LowercaseDocumentFilter : IDocumentFilter
{
public void Apply(SwaggerDocument swaggerDoc, SchemaRegistry schemaRegistry, IApiExplorer apiExplorer)
{
#
# This script will set up a full tyk environment on your machine
# and also create a demo user for you with one command
# USAGE
# -----
#
# $> ./setup.sh {IP ADDRESS OF DOCKER VM}
@smaglio81
smaglio81 / recreate-tykdocker.ps1
Created October 16, 2016 17:32
powershell commands to recreate tyk docker environment
docker stop $(docker ps -a -q) # stops all running containers in docker
docker rm $(docker ps -a -q) # removes all containers in docker (I wanted to start clean each time)
docker-compose up -d # recreates the environment (this is usually where errors happen)
{
"Path": "C:\\PoshHubot\\config.json",
"BotAdapter": "slack",
"BotDebugLog": {
"IsPresent": true
},
"BotDescription": "sysbot",
"BotPath": "D:\\Projects\\SAIT\\Hubot",
"BotOwner": "Allen",
"LogPath": "D:\\Projects\\SAIT\\Hubot\\logs",
set-executionpolicy unrestricted -force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco features enable -n=allowGlobalConfirmation
install-module poshhubot
Import-Module -Name PoshHubot
@"
{
[Wed May 24 2017 20:02:11 GMT+0000 (Coordinated Universal Time)] DEBUG Loading adapter slack
[Wed May 24 2017 20:02:12 GMT+0000 (Coordinated Universal Time)] INFO Logged in as sysbot of SIST
[Wed May 24 2017 20:02:13 GMT+0000 (Coordinated Universal Time)] INFO Slack client now connected
[Wed May 24 2017 20:02:13 GMT+0000 (Coordinated Universal Time)] DEBUG Loading scripts from D:\Projects\SAIT\Hubot\scripts
[Wed May 24 2017 20:02:13 GMT+0000 (Coordinated Universal Time)] DEBUG Parsing help for D:\Projects\SAIT\Hubot\scripts\example.coffee
[Wed May 24 2017 20:02:13 GMT+0000 (Coordinated Universal Time)] DEBUG Loading scripts from D:\Projects\SAIT\Hubot\src\scripts
[Wed May 24 2017 20:02:13 GMT+0000 (Coordinated Universal Time)] DEBUG Loading hubot-scripts from D:\Projects\SAIT\Hubot\node_modules\hubot-scripts\src\scripts
[Wed May 24 2017 20:02:13 GMT+0000 (Coordinated Universal Time)] WARNING Loading scripts from hubot-scripts.json is deprecated and will be removed in 3.0 (https://github.com/github/hubot-scrip
[Thu Nov 16 2017 01:38:51 GMT+0000 (Coordinated Universal Time)] INFO Slack client now connected
[Thu Nov 16 2017 01:38:51 GMT+0000 (Coordinated Universal Time)] DEBUG Loading scripts from C:\workspace\ApiGatewayHubot\scripts
[Thu Nov 16 2017 01:38:51 GMT+0000 (Coordinated Universal Time)] ERROR Unable to load C:\workspace\ApiGatewayHubot\scripts\DevApps-NoApiProducts: Error: The edge module has not been pre-compiled for node.js version v7.10.0. You must build a custom version of edge.node. Please refer to https://github.com/tjanczuk/edge for building instructions.
at determineVersion (C:\workspace\ApiGatewayHubot\node_modules\edge\lib\edge.js:21:11)
at Object.<anonymous> (C:\workspace\ApiGatewayHubot\node_modules\edge\lib\edge.js:33:102)
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Security.Principal;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http.Filters;
#if MVCEXTENSIONSNAME